QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#104910#2826. 历史行程lonytree#AC ✓2ms3820kbC++14517b2023-05-12 14:20:362023-05-12 14:20:37

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-05-12 14:20:37]
  • 评测
  • 测评结果:AC
  • 用时:2ms
  • 内存:3820kb
  • [2023-05-12 14:20:36]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;

int get_week(int C, int Y, int M, int D) {
    return ((C / 4) - 2 * C + Y + (Y / 4) + (13 * (M + 1) / 5) + D - 1) % 7;
}

int main() {
    int d;
    scanf("%d", &d);
    int C = d / 100, Y = d % 100, M = 5;
    int las = 1;
    for (int i = 1; i <= 14; i++) {
        if (get_week(C, Y, M, i) == 0) {
            if (!las) return !printf("%d\n", i);
            las--;
        }
    }
    // printf("%d\n", get_week(20, 23, 5, 14));
    return 0;
}

詳細信息

Test #1:

score: 100
Accepted
time: 2ms
memory: 3576kb

input:

1913

output:

11

result:

ok single line: '11'

Test #2:

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

input:

1914

output:

10

result:

ok single line: '10'

Test #3:

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

input:

1915

output:

9

result:

ok single line: '9'

Test #4:

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

input:

1916

output:

14

result:

ok single line: '14'

Test #5:

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

input:

1917

output:

13

result:

ok single line: '13'

Test #6:

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

input:

1918

output:

12

result:

ok single line: '12'

Test #7:

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

input:

1919

output:

11

result:

ok single line: '11'

Test #8:

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

input:

1920

output:

9

result:

ok single line: '9'

Test #9:

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

input:

1921

output:

8

result:

ok single line: '8'

Test #10:

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

input:

1922

output:

14

result:

ok single line: '14'

Test #11:

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

input:

1923

output:

13

result:

ok single line: '13'

Test #12:

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

input:

1924

output:

11

result:

ok single line: '11'

Test #13:

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

input:

1925

output:

10

result:

ok single line: '10'

Test #14:

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

input:

1926

output:

9

result:

ok single line: '9'

Test #15:

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

input:

1927

output:

8

result:

ok single line: '8'

Test #16:

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

input:

1928

output:

13

result:

ok single line: '13'

Test #17:

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

input:

1929

output:

12

result:

ok single line: '12'

Test #18:

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

input:

1930

output:

11

result:

ok single line: '11'

Test #19:

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

input:

1931

output:

10

result:

ok single line: '10'

Test #20:

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

input:

1932

output:

8

result:

ok single line: '8'

Test #21:

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

input:

1933

output:

14

result:

ok single line: '14'

Test #22:

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

input:

1934

output:

13

result:

ok single line: '13'

Test #23:

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

input:

1935

output:

12

result:

ok single line: '12'

Test #24:

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

input:

1936

output:

10

result:

ok single line: '10'

Test #25:

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

input:

1937

output:

9

result:

ok single line: '9'

Test #26:

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

input:

1938

output:

8

result:

ok single line: '8'

Test #27:

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

input:

1939

output:

14

result:

ok single line: '14'

Test #28:

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

input:

1940

output:

12

result:

ok single line: '12'

Test #29:

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

input:

1941

output:

11

result:

ok single line: '11'

Test #30:

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

input:

1942

output:

10

result:

ok single line: '10'

Test #31:

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

input:

1943

output:

9

result:

ok single line: '9'

Test #32:

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

input:

1944

output:

14

result:

ok single line: '14'

Test #33:

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

input:

1945

output:

13

result:

ok single line: '13'

Test #34:

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

input:

1946

output:

12

result:

ok single line: '12'

Test #35:

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

input:

1947

output:

11

result:

ok single line: '11'

Test #36:

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

input:

1948

output:

9

result:

ok single line: '9'

Test #37:

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

input:

1949

output:

8

result:

ok single line: '8'

Test #38:

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

input:

1950

output:

14

result:

ok single line: '14'

Test #39:

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

input:

1951

output:

13

result:

ok single line: '13'

Test #40:

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

input:

1952

output:

11

result:

ok single line: '11'

Test #41:

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

input:

1953

output:

10

result:

ok single line: '10'

Test #42:

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

input:

1954

output:

9

result:

ok single line: '9'

Test #43:

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

input:

1955

output:

8

result:

ok single line: '8'

Test #44:

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

input:

1956

output:

13

result:

ok single line: '13'

Test #45:

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

input:

1957

output:

12

result:

ok single line: '12'

Test #46:

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

input:

1958

output:

11

result:

ok single line: '11'

Test #47:

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

input:

1959

output:

10

result:

ok single line: '10'

Test #48:

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

input:

1960

output:

8

result:

ok single line: '8'

Test #49:

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

input:

1961

output:

14

result:

ok single line: '14'

Test #50:

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

input:

1962

output:

13

result:

ok single line: '13'

Test #51:

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

input:

1963

output:

12

result:

ok single line: '12'

Test #52:

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

input:

1964

output:

10

result:

ok single line: '10'

Test #53:

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

input:

1965

output:

9

result:

ok single line: '9'

Test #54:

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

input:

1966

output:

8

result:

ok single line: '8'

Test #55:

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

input:

1967

output:

14

result:

ok single line: '14'

Test #56:

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

input:

1968

output:

12

result:

ok single line: '12'

Test #57:

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

input:

1969

output:

11

result:

ok single line: '11'

Test #58:

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

input:

1970

output:

10

result:

ok single line: '10'

Test #59:

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

input:

1971

output:

9

result:

ok single line: '9'

Test #60:

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

input:

1972

output:

14

result:

ok single line: '14'

Test #61:

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

input:

1973

output:

13

result:

ok single line: '13'

Test #62:

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

input:

1974

output:

12

result:

ok single line: '12'

Test #63:

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

input:

1975

output:

11

result:

ok single line: '11'

Test #64:

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

input:

1976

output:

9

result:

ok single line: '9'

Test #65:

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

input:

1977

output:

8

result:

ok single line: '8'

Test #66:

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

input:

1978

output:

14

result:

ok single line: '14'

Test #67:

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

input:

1979

output:

13

result:

ok single line: '13'

Test #68:

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

input:

1980

output:

11

result:

ok single line: '11'

Test #69:

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

input:

1981

output:

10

result:

ok single line: '10'

Test #70:

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

input:

1982

output:

9

result:

ok single line: '9'

Test #71:

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

input:

1983

output:

8

result:

ok single line: '8'

Test #72:

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

input:

1984

output:

13

result:

ok single line: '13'

Test #73:

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

input:

1985

output:

12

result:

ok single line: '12'

Test #74:

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

input:

1986

output:

11

result:

ok single line: '11'

Test #75:

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

input:

1987

output:

10

result:

ok single line: '10'

Test #76:

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

input:

1988

output:

8

result:

ok single line: '8'

Test #77:

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

input:

1989

output:

14

result:

ok single line: '14'

Test #78:

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

input:

1990

output:

13

result:

ok single line: '13'

Test #79:

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

input:

1991

output:

12

result:

ok single line: '12'

Test #80:

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

input:

1992

output:

10

result:

ok single line: '10'

Test #81:

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

input:

1993

output:

9

result:

ok single line: '9'

Test #82:

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

input:

1994

output:

8

result:

ok single line: '8'

Test #83:

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

input:

1995

output:

14

result:

ok single line: '14'

Test #84:

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

input:

1996

output:

12

result:

ok single line: '12'

Test #85:

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

input:

1997

output:

11

result:

ok single line: '11'

Test #86:

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

input:

1998

output:

10

result:

ok single line: '10'

Test #87:

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

input:

1999

output:

9

result:

ok single line: '9'

Test #88:

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

input:

2000

output:

14

result:

ok single line: '14'

Test #89:

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

input:

2001

output:

13

result:

ok single line: '13'

Test #90:

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

input:

2002

output:

12

result:

ok single line: '12'

Test #91:

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

input:

2003

output:

11

result:

ok single line: '11'

Test #92:

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

input:

2004

output:

9

result:

ok single line: '9'

Test #93:

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

input:

2005

output:

8

result:

ok single line: '8'

Test #94:

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

input:

2006

output:

14

result:

ok single line: '14'

Test #95:

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

input:

2007

output:

13

result:

ok single line: '13'

Test #96:

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

input:

2008

output:

11

result:

ok single line: '11'

Test #97:

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

input:

2009

output:

10

result:

ok single line: '10'

Test #98:

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

input:

2010

output:

9

result:

ok single line: '9'

Test #99:

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

input:

2011

output:

8

result:

ok single line: '8'

Test #100:

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

input:

2012

output:

13

result:

ok single line: '13'

Test #101:

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

input:

2013

output:

12

result:

ok single line: '12'

Test #102:

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

input:

2014

output:

11

result:

ok single line: '11'

Test #103:

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

input:

2015

output:

10

result:

ok single line: '10'

Test #104:

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

input:

2016

output:

8

result:

ok single line: '8'

Test #105:

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

input:

2017

output:

14

result:

ok single line: '14'

Test #106:

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

input:

2018

output:

13

result:

ok single line: '13'

Test #107:

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

input:

2019

output:

12

result:

ok single line: '12'