QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#21259#2826. 历史行程DaBenZhongXiaSongKuaiDi#AC ✓5ms3856kbC++20341b2022-03-04 14:08:562022-05-08 02:48:19

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2022-05-08 02:48:19]
  • 评测
  • 测评结果:AC
  • 用时:5ms
  • 内存:3856kb
  • [2022-03-04 14:08:56]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
int n,now=2022,day=6,date=1;
inline bool chk(int x) {return (!(x%4) && x%100) || !(x%400);}
int main(){
	scanf("%d",&n);
	while(now>n) day=((day-(chk(now) ? 366:365))%7+7)%7,--now;
	int cnt=(day==6);
	while(cnt<2) ++date,day=(day+1)%7,cnt+=(day==6);
	printf("%d\n",date);
	return 0;
}

详细

Test #1:

score: 100
Accepted
time: 3ms
memory: 3752kb

input:

1913

output:

11

result:

ok single line: '11'

Test #2:

score: 0
Accepted
time: 3ms
memory: 3844kb

input:

1914

output:

10

result:

ok single line: '10'

Test #3:

score: 0
Accepted
time: 3ms
memory: 3752kb

input:

1915

output:

9

result:

ok single line: '9'

Test #4:

score: 0
Accepted
time: 1ms
memory: 3780kb

input:

1916

output:

14

result:

ok single line: '14'

Test #5:

score: 0
Accepted
time: 3ms
memory: 3784kb

input:

1917

output:

13

result:

ok single line: '13'

Test #6:

score: 0
Accepted
time: 0ms
memory: 3724kb

input:

1918

output:

12

result:

ok single line: '12'

Test #7:

score: 0
Accepted
time: 2ms
memory: 3792kb

input:

1919

output:

11

result:

ok single line: '11'

Test #8:

score: 0
Accepted
time: 2ms
memory: 3840kb

input:

1920

output:

9

result:

ok single line: '9'

Test #9:

score: 0
Accepted
time: 1ms
memory: 3768kb

input:

1921

output:

8

result:

ok single line: '8'

Test #10:

score: 0
Accepted
time: 1ms
memory: 3756kb

input:

1922

output:

14

result:

ok single line: '14'

Test #11:

score: 0
Accepted
time: 3ms
memory: 3724kb

input:

1923

output:

13

result:

ok single line: '13'

Test #12:

score: 0
Accepted
time: 2ms
memory: 3800kb

input:

1924

output:

11

result:

ok single line: '11'

Test #13:

score: 0
Accepted
time: 0ms
memory: 3684kb

input:

1925

output:

10

result:

ok single line: '10'

Test #14:

score: 0
Accepted
time: 3ms
memory: 3768kb

input:

1926

output:

9

result:

ok single line: '9'

Test #15:

score: 0
Accepted
time: 3ms
memory: 3776kb

input:

1927

output:

8

result:

ok single line: '8'

Test #16:

score: 0
Accepted
time: 3ms
memory: 3704kb

input:

1928

output:

13

result:

ok single line: '13'

Test #17:

score: 0
Accepted
time: 5ms
memory: 3756kb

input:

1929

output:

12

result:

ok single line: '12'

Test #18:

score: 0
Accepted
time: 1ms
memory: 3840kb

input:

1930

output:

11

result:

ok single line: '11'

Test #19:

score: 0
Accepted
time: 2ms
memory: 3844kb

input:

1931

output:

10

result:

ok single line: '10'

Test #20:

score: 0
Accepted
time: 0ms
memory: 3760kb

input:

1932

output:

8

result:

ok single line: '8'

Test #21:

score: 0
Accepted
time: 1ms
memory: 3760kb

input:

1933

output:

14

result:

ok single line: '14'

Test #22:

score: 0
Accepted
time: 1ms
memory: 3756kb

input:

1934

output:

13

result:

ok single line: '13'

Test #23:

score: 0
Accepted
time: 2ms
memory: 3756kb

input:

1935

output:

12

result:

ok single line: '12'

Test #24:

score: 0
Accepted
time: 2ms
memory: 3760kb

input:

1936

output:

10

result:

ok single line: '10'

Test #25:

score: 0
Accepted
time: 1ms
memory: 3756kb

input:

1937

output:

9

result:

ok single line: '9'

Test #26:

score: 0
Accepted
time: 0ms
memory: 3788kb

input:

1938

output:

8

result:

ok single line: '8'

Test #27:

score: 0
Accepted
time: 3ms
memory: 3756kb

input:

1939

output:

14

result:

ok single line: '14'

Test #28:

score: 0
Accepted
time: 1ms
memory: 3728kb

input:

1940

output:

12

result:

ok single line: '12'

Test #29:

score: 0
Accepted
time: 2ms
memory: 3768kb

input:

1941

output:

11

result:

ok single line: '11'

Test #30:

score: 0
Accepted
time: 1ms
memory: 3816kb

input:

1942

output:

10

result:

ok single line: '10'

Test #31:

score: 0
Accepted
time: 3ms
memory: 3724kb

input:

1943

output:

9

result:

ok single line: '9'

Test #32:

score: 0
Accepted
time: 3ms
memory: 3756kb

input:

1944

output:

14

result:

ok single line: '14'

Test #33:

score: 0
Accepted
time: 0ms
memory: 3772kb

input:

1945

output:

13

result:

ok single line: '13'

Test #34:

score: 0
Accepted
time: 0ms
memory: 3788kb

input:

1946

output:

12

result:

ok single line: '12'

Test #35:

score: 0
Accepted
time: 3ms
memory: 3640kb

input:

1947

output:

11

result:

ok single line: '11'

Test #36:

score: 0
Accepted
time: 3ms
memory: 3776kb

input:

1948

output:

9

result:

ok single line: '9'

Test #37:

score: 0
Accepted
time: 3ms
memory: 3776kb

input:

1949

output:

8

result:

ok single line: '8'

Test #38:

score: 0
Accepted
time: 2ms
memory: 3772kb

input:

1950

output:

14

result:

ok single line: '14'

Test #39:

score: 0
Accepted
time: 1ms
memory: 3800kb

input:

1951

output:

13

result:

ok single line: '13'

Test #40:

score: 0
Accepted
time: 0ms
memory: 3680kb

input:

1952

output:

11

result:

ok single line: '11'

Test #41:

score: 0
Accepted
time: 3ms
memory: 3844kb

input:

1953

output:

10

result:

ok single line: '10'

Test #42:

score: 0
Accepted
time: 3ms
memory: 3844kb

input:

1954

output:

9

result:

ok single line: '9'

Test #43:

score: 0
Accepted
time: 2ms
memory: 3776kb

input:

1955

output:

8

result:

ok single line: '8'

Test #44:

score: 0
Accepted
time: 3ms
memory: 3760kb

input:

1956

output:

13

result:

ok single line: '13'

Test #45:

score: 0
Accepted
time: 2ms
memory: 3776kb

input:

1957

output:

12

result:

ok single line: '12'

Test #46:

score: 0
Accepted
time: 0ms
memory: 3776kb

input:

1958

output:

11

result:

ok single line: '11'

Test #47:

score: 0
Accepted
time: 3ms
memory: 3840kb

input:

1959

output:

10

result:

ok single line: '10'

Test #48:

score: 0
Accepted
time: 3ms
memory: 3752kb

input:

1960

output:

8

result:

ok single line: '8'

Test #49:

score: 0
Accepted
time: 2ms
memory: 3704kb

input:

1961

output:

14

result:

ok single line: '14'

Test #50:

score: 0
Accepted
time: 3ms
memory: 3724kb

input:

1962

output:

13

result:

ok single line: '13'

Test #51:

score: 0
Accepted
time: 3ms
memory: 3844kb

input:

1963

output:

12

result:

ok single line: '12'

Test #52:

score: 0
Accepted
time: 3ms
memory: 3776kb

input:

1964

output:

10

result:

ok single line: '10'

Test #53:

score: 0
Accepted
time: 0ms
memory: 3804kb

input:

1965

output:

9

result:

ok single line: '9'

Test #54:

score: 0
Accepted
time: 3ms
memory: 3772kb

input:

1966

output:

8

result:

ok single line: '8'

Test #55:

score: 0
Accepted
time: 3ms
memory: 3704kb

input:

1967

output:

14

result:

ok single line: '14'

Test #56:

score: 0
Accepted
time: 1ms
memory: 3728kb

input:

1968

output:

12

result:

ok single line: '12'

Test #57:

score: 0
Accepted
time: 2ms
memory: 3752kb

input:

1969

output:

11

result:

ok single line: '11'

Test #58:

score: 0
Accepted
time: 1ms
memory: 3752kb

input:

1970

output:

10

result:

ok single line: '10'

Test #59:

score: 0
Accepted
time: 1ms
memory: 3756kb

input:

1971

output:

9

result:

ok single line: '9'

Test #60:

score: 0
Accepted
time: 3ms
memory: 3708kb

input:

1972

output:

14

result:

ok single line: '14'

Test #61:

score: 0
Accepted
time: 0ms
memory: 3724kb

input:

1973

output:

13

result:

ok single line: '13'

Test #62:

score: 0
Accepted
time: 3ms
memory: 3756kb

input:

1974

output:

12

result:

ok single line: '12'

Test #63:

score: 0
Accepted
time: 3ms
memory: 3776kb

input:

1975

output:

11

result:

ok single line: '11'

Test #64:

score: 0
Accepted
time: 3ms
memory: 3788kb

input:

1976

output:

9

result:

ok single line: '9'

Test #65:

score: 0
Accepted
time: 3ms
memory: 3808kb

input:

1977

output:

8

result:

ok single line: '8'

Test #66:

score: 0
Accepted
time: 0ms
memory: 3744kb

input:

1978

output:

14

result:

ok single line: '14'

Test #67:

score: 0
Accepted
time: 3ms
memory: 3776kb

input:

1979

output:

13

result:

ok single line: '13'

Test #68:

score: 0
Accepted
time: 3ms
memory: 3800kb

input:

1980

output:

11

result:

ok single line: '11'

Test #69:

score: 0
Accepted
time: 0ms
memory: 3680kb

input:

1981

output:

10

result:

ok single line: '10'

Test #70:

score: 0
Accepted
time: 3ms
memory: 3844kb

input:

1982

output:

9

result:

ok single line: '9'

Test #71:

score: 0
Accepted
time: 3ms
memory: 3804kb

input:

1983

output:

8

result:

ok single line: '8'

Test #72:

score: 0
Accepted
time: 3ms
memory: 3668kb

input:

1984

output:

13

result:

ok single line: '13'

Test #73:

score: 0
Accepted
time: 3ms
memory: 3784kb

input:

1985

output:

12

result:

ok single line: '12'

Test #74:

score: 0
Accepted
time: 1ms
memory: 3776kb

input:

1986

output:

11

result:

ok single line: '11'

Test #75:

score: 0
Accepted
time: 3ms
memory: 3788kb

input:

1987

output:

10

result:

ok single line: '10'

Test #76:

score: 0
Accepted
time: 3ms
memory: 3752kb

input:

1988

output:

8

result:

ok single line: '8'

Test #77:

score: 0
Accepted
time: 3ms
memory: 3752kb

input:

1989

output:

14

result:

ok single line: '14'

Test #78:

score: 0
Accepted
time: 3ms
memory: 3752kb

input:

1990

output:

13

result:

ok single line: '13'

Test #79:

score: 0
Accepted
time: 3ms
memory: 3756kb

input:

1991

output:

12

result:

ok single line: '12'

Test #80:

score: 0
Accepted
time: 2ms
memory: 3728kb

input:

1992

output:

10

result:

ok single line: '10'

Test #81:

score: 0
Accepted
time: 3ms
memory: 3804kb

input:

1993

output:

9

result:

ok single line: '9'

Test #82:

score: 0
Accepted
time: 3ms
memory: 3844kb

input:

1994

output:

8

result:

ok single line: '8'

Test #83:

score: 0
Accepted
time: 3ms
memory: 3680kb

input:

1995

output:

14

result:

ok single line: '14'

Test #84:

score: 0
Accepted
time: 0ms
memory: 3636kb

input:

1996

output:

12

result:

ok single line: '12'

Test #85:

score: 0
Accepted
time: 3ms
memory: 3784kb

input:

1997

output:

11

result:

ok single line: '11'

Test #86:

score: 0
Accepted
time: 3ms
memory: 3772kb

input:

1998

output:

10

result:

ok single line: '10'

Test #87:

score: 0
Accepted
time: 1ms
memory: 3772kb

input:

1999

output:

9

result:

ok single line: '9'

Test #88:

score: 0
Accepted
time: 3ms
memory: 3760kb

input:

2000

output:

14

result:

ok single line: '14'

Test #89:

score: 0
Accepted
time: 3ms
memory: 3680kb

input:

2001

output:

13

result:

ok single line: '13'

Test #90:

score: 0
Accepted
time: 0ms
memory: 3752kb

input:

2002

output:

12

result:

ok single line: '12'

Test #91:

score: 0
Accepted
time: 0ms
memory: 3772kb

input:

2003

output:

11

result:

ok single line: '11'

Test #92:

score: 0
Accepted
time: 3ms
memory: 3856kb

input:

2004

output:

9

result:

ok single line: '9'

Test #93:

score: 0
Accepted
time: 2ms
memory: 3752kb

input:

2005

output:

8

result:

ok single line: '8'

Test #94:

score: 0
Accepted
time: 3ms
memory: 3844kb

input:

2006

output:

14

result:

ok single line: '14'

Test #95:

score: 0
Accepted
time: 3ms
memory: 3672kb

input:

2007

output:

13

result:

ok single line: '13'

Test #96:

score: 0
Accepted
time: 3ms
memory: 3768kb

input:

2008

output:

11

result:

ok single line: '11'

Test #97:

score: 0
Accepted
time: 3ms
memory: 3780kb

input:

2009

output:

10

result:

ok single line: '10'

Test #98:

score: 0
Accepted
time: 1ms
memory: 3636kb

input:

2010

output:

9

result:

ok single line: '9'

Test #99:

score: 0
Accepted
time: 1ms
memory: 3780kb

input:

2011

output:

8

result:

ok single line: '8'

Test #100:

score: 0
Accepted
time: 3ms
memory: 3756kb

input:

2012

output:

13

result:

ok single line: '13'

Test #101:

score: 0
Accepted
time: 3ms
memory: 3708kb

input:

2013

output:

12

result:

ok single line: '12'

Test #102:

score: 0
Accepted
time: 1ms
memory: 3840kb

input:

2014

output:

11

result:

ok single line: '11'

Test #103:

score: 0
Accepted
time: 2ms
memory: 3792kb

input:

2015

output:

10

result:

ok single line: '10'

Test #104:

score: 0
Accepted
time: 3ms
memory: 3816kb

input:

2016

output:

8

result:

ok single line: '8'

Test #105:

score: 0
Accepted
time: 2ms
memory: 3780kb

input:

2017

output:

14

result:

ok single line: '14'

Test #106:

score: 0
Accepted
time: 0ms
memory: 3772kb

input:

2018

output:

13

result:

ok single line: '13'

Test #107:

score: 0
Accepted
time: 2ms
memory: 3772kb

input:

2019

output:

12

result:

ok single line: '12'