Submission #19456820


Source Code Expand

Copy
a,b=map(int,input().split())

if a%4==0 :
    p=a
else :
    p=a+(4-a%4)
if b%4==0 :
    q=b
else :
    q=b-b%4

if p<=q :
    ant=(q-p)//4+1
else :
    print(0)
    exit()


if a%100==0 :
    p=a
else :
    p=a+(100-a%100)
if b%100==0 :
    q=b
else :
    q=b-b%100

if p<=q :
    bnt=(q-p)//100+1
else :
    bnt=0


if a%400==0 :
    p=a
else :
    p=a+(400-a%400)
if b%400==0 :
    q=b
else :
    q=b-b%400

if p<=q :
    cnt=(q-p)//400+1
else :
    cnt=0

print(ant-bnt+cnt)

Submission Info

Submission Time
Task C - 2月29日
User makoto_kyoto
Language Python (3.8.2)
Score 100
Code Size 525 Byte
Status AC
Exec Time 29 ms
Memory 9120 KB

Judge Result

Set Name sub All
Score / Max Score 25 / 25 75 / 75
Status
AC × 10
AC × 22
Set Name Test Cases
sub test_01A.txt, test_02A.txt, test_03A.txt, test_04A.txt, test_05A.txt, test_07A.txt, test_09A.txt, test_11A.txt, test_13A.txt, test_15A.txt
All sample_01.txt, sample_02.txt, sample_03.txt, test_01A.txt, test_02A.txt, test_03A.txt, test_04A.txt, test_05A.txt, test_06.txt, test_07A.txt, test_08.txt, test_09A.txt, test_10.txt, test_11A.txt, test_12.txt, test_13A.txt, test_14.txt, test_15A.txt, test_16.txt, sample_01.txt, sample_02.txt, sample_03.txt
Case Name Status Exec Time Memory
sample_01.txt AC 29 ms 9040 KB
sample_02.txt AC 24 ms 8872 KB
sample_03.txt AC 17 ms 8940 KB
test_01A.txt AC 28 ms 8976 KB
test_02A.txt AC 24 ms 9004 KB
test_03A.txt AC 19 ms 9068 KB
test_04A.txt AC 17 ms 8876 KB
test_05A.txt AC 19 ms 8876 KB
test_06.txt AC 22 ms 8988 KB
test_07A.txt AC 28 ms 9000 KB
test_08.txt AC 19 ms 8940 KB
test_09A.txt AC 18 ms 8980 KB
test_10.txt AC 20 ms 8836 KB
test_11A.txt AC 26 ms 9120 KB
test_12.txt AC 18 ms 8876 KB
test_13A.txt AC 26 ms 9004 KB
test_14.txt AC 17 ms 8884 KB
test_15A.txt AC 18 ms 8976 KB
test_16.txt AC 21 ms 9004 KB