QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#172969 | #7176. I Flipped The Calendar... | ucup-team1631# | AC ✓ | 19ms | 9280kb | Python3 | 1.3kb | 2023-09-09 21:26:38 | 2023-09-09 21:26:38 |
Judging History
answer
'''
import calendar
import datetime
def calc(year):
ans=0
for month in range(1,13):
ans+=1
now=datetime.date(year,month,1).weekday()
days=calendar.monthrange(year,month)[1]
for _ in range(days-1):
now+=1
now%=7
if now==0:
ans+=1
return ans
'''
d={1950: 63, 1951: 63, 1952: 62, 1953: 63, 1954: 61, 1955: 63, 1956: 64, 1957: 62, 1958: 62, 1959: 63, 1960: 62, 1961: 63, 1962: 63, 1963: 62, 1964: 63, 1965: 61, 1966: 63, 1967: 63, 1968: 62, 1969: 62, 1970: 63, 1971: 61, 1972: 63, 1973: 63, 1974: 62, 1975: 62, 1976: 62, 1977: 63, 1978: 63, 1979: 63, 1980: 62, 1981: 63, 1982: 61, 1983: 63, 1984: 64, 1985: 62, 1986: 62, 1987: 63, 1988: 62, 1989: 63, 1990: 63, 1991: 62, 1992: 63, 1993: 61, 1994: 63, 1995: 63, 1996: 62, 1997: 62, 1998: 63, 1999: 61, 2000: 63, 2001: 63, 2002: 62, 2003: 62, 2004: 62, 2005: 63, 2006: 63, 2007: 63, 2008: 62, 2009: 63, 2010: 61, 2011: 63, 2012: 64, 2013: 62, 2014: 62, 2015: 63, 2016: 62, 2017: 63, 2018: 63, 2019: 62, 2020: 63, 2021: 61, 2022: 63, 2023: 63, 2024: 62, 2025: 62, 2026: 63, 2027: 61, 2028: 63, 2029: 63, 2030: 62, 2031: 62, 2032: 62, 2033: 63, 2034: 63, 2035: 63, 2036: 62, 2037: 63, 2038: 61, 2039: 63, 2040: 64, 2041: 62, 2042: 62, 2043: 63, 2044: 62, 2045: 63, 2046: 63, 2047: 62, 2048: 63, 2049: 61}
print(d[int(input())])
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 16ms
memory: 9040kb
input:
2023
output:
63
result:
ok 1 number(s): "63"
Test #2:
score: 0
Accepted
time: 19ms
memory: 9108kb
input:
1970
output:
63
result:
ok 1 number(s): "63"
Test #3:
score: 0
Accepted
time: 12ms
memory: 9080kb
input:
1971
output:
61
result:
ok 1 number(s): "61"
Test #4:
score: 0
Accepted
time: 19ms
memory: 9120kb
input:
1972
output:
63
result:
ok 1 number(s): "63"
Test #5:
score: 0
Accepted
time: 16ms
memory: 9280kb
input:
1973
output:
63
result:
ok 1 number(s): "63"
Test #6:
score: 0
Accepted
time: 6ms
memory: 9120kb
input:
1974
output:
62
result:
ok 1 number(s): "62"
Test #7:
score: 0
Accepted
time: 13ms
memory: 9040kb
input:
1975
output:
62
result:
ok 1 number(s): "62"
Test #8:
score: 0
Accepted
time: 14ms
memory: 9112kb
input:
1976
output:
62
result:
ok 1 number(s): "62"
Test #9:
score: 0
Accepted
time: 9ms
memory: 9172kb
input:
1977
output:
63
result:
ok 1 number(s): "63"
Test #10:
score: 0
Accepted
time: 15ms
memory: 9080kb
input:
1978
output:
63
result:
ok 1 number(s): "63"
Test #11:
score: 0
Accepted
time: 9ms
memory: 9108kb
input:
1979
output:
63
result:
ok 1 number(s): "63"
Test #12:
score: 0
Accepted
time: 19ms
memory: 9176kb
input:
1980
output:
62
result:
ok 1 number(s): "62"
Test #13:
score: 0
Accepted
time: 19ms
memory: 9112kb
input:
1981
output:
63
result:
ok 1 number(s): "63"
Test #14:
score: 0
Accepted
time: 12ms
memory: 9176kb
input:
1982
output:
61
result:
ok 1 number(s): "61"
Test #15:
score: 0
Accepted
time: 9ms
memory: 9176kb
input:
1983
output:
63
result:
ok 1 number(s): "63"
Test #16:
score: 0
Accepted
time: 4ms
memory: 9108kb
input:
1984
output:
64
result:
ok 1 number(s): "64"
Test #17:
score: 0
Accepted
time: 14ms
memory: 9168kb
input:
1985
output:
62
result:
ok 1 number(s): "62"
Test #18:
score: 0
Accepted
time: 7ms
memory: 9176kb
input:
1986
output:
62
result:
ok 1 number(s): "62"
Test #19:
score: 0
Accepted
time: 18ms
memory: 9120kb
input:
1987
output:
63
result:
ok 1 number(s): "63"
Test #20:
score: 0
Accepted
time: 11ms
memory: 9076kb
input:
1988
output:
62
result:
ok 1 number(s): "62"
Test #21:
score: 0
Accepted
time: 8ms
memory: 9080kb
input:
1989
output:
63
result:
ok 1 number(s): "63"
Test #22:
score: 0
Accepted
time: 6ms
memory: 9084kb
input:
1990
output:
63
result:
ok 1 number(s): "63"
Test #23:
score: 0
Accepted
time: 9ms
memory: 9172kb
input:
1991
output:
62
result:
ok 1 number(s): "62"
Test #24:
score: 0
Accepted
time: 11ms
memory: 9052kb
input:
1992
output:
63
result:
ok 1 number(s): "63"
Test #25:
score: 0
Accepted
time: 4ms
memory: 9120kb
input:
1993
output:
61
result:
ok 1 number(s): "61"
Test #26:
score: 0
Accepted
time: 14ms
memory: 9096kb
input:
1994
output:
63
result:
ok 1 number(s): "63"
Test #27:
score: 0
Accepted
time: 19ms
memory: 9080kb
input:
1995
output:
63
result:
ok 1 number(s): "63"
Test #28:
score: 0
Accepted
time: 18ms
memory: 9076kb
input:
1996
output:
62
result:
ok 1 number(s): "62"
Test #29:
score: 0
Accepted
time: 11ms
memory: 9052kb
input:
1997
output:
62
result:
ok 1 number(s): "62"
Test #30:
score: 0
Accepted
time: 6ms
memory: 9168kb
input:
1998
output:
63
result:
ok 1 number(s): "63"
Test #31:
score: 0
Accepted
time: 8ms
memory: 9080kb
input:
1999
output:
61
result:
ok 1 number(s): "61"
Test #32:
score: 0
Accepted
time: 4ms
memory: 9044kb
input:
2000
output:
63
result:
ok 1 number(s): "63"
Test #33:
score: 0
Accepted
time: 15ms
memory: 9168kb
input:
2001
output:
63
result:
ok 1 number(s): "63"
Test #34:
score: 0
Accepted
time: 14ms
memory: 9116kb
input:
2002
output:
62
result:
ok 1 number(s): "62"
Test #35:
score: 0
Accepted
time: 11ms
memory: 9076kb
input:
2003
output:
62
result:
ok 1 number(s): "62"
Test #36:
score: 0
Accepted
time: 13ms
memory: 9116kb
input:
2004
output:
62
result:
ok 1 number(s): "62"
Test #37:
score: 0
Accepted
time: 10ms
memory: 9116kb
input:
2005
output:
63
result:
ok 1 number(s): "63"
Test #38:
score: 0
Accepted
time: 12ms
memory: 9076kb
input:
2006
output:
63
result:
ok 1 number(s): "63"
Test #39:
score: 0
Accepted
time: 8ms
memory: 9100kb
input:
2007
output:
63
result:
ok 1 number(s): "63"
Test #40:
score: 0
Accepted
time: 13ms
memory: 9044kb
input:
2008
output:
62
result:
ok 1 number(s): "62"
Test #41:
score: 0
Accepted
time: 6ms
memory: 9212kb
input:
2009
output:
63
result:
ok 1 number(s): "63"
Test #42:
score: 0
Accepted
time: 7ms
memory: 9080kb
input:
2010
output:
61
result:
ok 1 number(s): "61"
Test #43:
score: 0
Accepted
time: 10ms
memory: 9172kb
input:
2011
output:
63
result:
ok 1 number(s): "63"
Test #44:
score: 0
Accepted
time: 9ms
memory: 9076kb
input:
2012
output:
64
result:
ok 1 number(s): "64"
Test #45:
score: 0
Accepted
time: 18ms
memory: 9176kb
input:
2013
output:
62
result:
ok 1 number(s): "62"
Test #46:
score: 0
Accepted
time: 13ms
memory: 9108kb
input:
2014
output:
62
result:
ok 1 number(s): "62"
Test #47:
score: 0
Accepted
time: 6ms
memory: 9108kb
input:
2015
output:
63
result:
ok 1 number(s): "63"
Test #48:
score: 0
Accepted
time: 18ms
memory: 9056kb
input:
2016
output:
62
result:
ok 1 number(s): "62"
Test #49:
score: 0
Accepted
time: 10ms
memory: 9168kb
input:
2017
output:
63
result:
ok 1 number(s): "63"
Test #50:
score: 0
Accepted
time: 5ms
memory: 9164kb
input:
2018
output:
63
result:
ok 1 number(s): "63"
Test #51:
score: 0
Accepted
time: 7ms
memory: 9044kb
input:
2019
output:
62
result:
ok 1 number(s): "62"
Test #52:
score: 0
Accepted
time: 4ms
memory: 9100kb
input:
2020
output:
63
result:
ok 1 number(s): "63"
Test #53:
score: 0
Accepted
time: 9ms
memory: 9084kb
input:
2021
output:
61
result:
ok 1 number(s): "61"
Test #54:
score: 0
Accepted
time: 9ms
memory: 9112kb
input:
2022
output:
63
result:
ok 1 number(s): "63"
Test #55:
score: 0
Accepted
time: 11ms
memory: 9168kb
input:
2024
output:
62
result:
ok 1 number(s): "62"
Test #56:
score: 0
Accepted
time: 13ms
memory: 9044kb
input:
2025
output:
62
result:
ok 1 number(s): "62"
Test #57:
score: 0
Accepted
time: 14ms
memory: 9120kb
input:
2026
output:
63
result:
ok 1 number(s): "63"
Test #58:
score: 0
Accepted
time: 1ms
memory: 9124kb
input:
2027
output:
61
result:
ok 1 number(s): "61"
Test #59:
score: 0
Accepted
time: 9ms
memory: 9180kb
input:
2028
output:
63
result:
ok 1 number(s): "63"
Test #60:
score: 0
Accepted
time: 12ms
memory: 9080kb
input:
2029
output:
63
result:
ok 1 number(s): "63"
Test #61:
score: 0
Accepted
time: 6ms
memory: 9044kb
input:
2030
output:
62
result:
ok 1 number(s): "62"
Test #62:
score: 0
Accepted
time: 10ms
memory: 9076kb
input:
2031
output:
62
result:
ok 1 number(s): "62"
Test #63:
score: 0
Accepted
time: 4ms
memory: 9100kb
input:
2032
output:
62
result:
ok 1 number(s): "62"
Test #64:
score: 0
Accepted
time: 7ms
memory: 9048kb
input:
2033
output:
63
result:
ok 1 number(s): "63"
Test #65:
score: 0
Accepted
time: 12ms
memory: 9216kb
input:
2034
output:
63
result:
ok 1 number(s): "63"
Test #66:
score: 0
Accepted
time: 18ms
memory: 9168kb
input:
2035
output:
63
result:
ok 1 number(s): "63"
Test #67:
score: 0
Accepted
time: 9ms
memory: 9168kb
input:
2036
output:
62
result:
ok 1 number(s): "62"
Test #68:
score: 0
Accepted
time: 19ms
memory: 9088kb
input:
2037
output:
63
result:
ok 1 number(s): "63"
Extra Test:
score: 0
Extra Test Passed