CODE FESTIVAL 2014 予選A

Submission #385792

Source codeソースコード

A, B = map(int, input().split())
tlist = [0 for _ in range(401)]
uru = lambda x: 1 if (x % 400 == 0 or x % 100 != 0) and x % 4 == 0 else 0
for i in range(1, 401):
    tlist[i] = tlist[i - 1] + uru(i)
calc = lambda x,l:x // 400 * l[400] + l[x % 400]
print(calc(B, tlist) - calc(A, tlist) + uru(A))

Submission

Task問題 C - 2月29日
User nameユーザ名 yumechi0525
Created time投稿日時
Language言語 Python3 (3.2.3)
Status状態 AC
Score得点 100
Source lengthソースコード長 302 Byte
File nameファイル名
Exec time実行時間 133 ms
Memory usageメモリ使用量 8680 KB

Test case

Set

Set name Score得点 / Max score Cases
sub 25 / 25 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 75 / 75 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

Test case

Case name Status状態 Exec time実行時間 Memory usageメモリ使用量
sample_01.txt AC 126 ms 8484 KB
sample_02.txt AC 131 ms 8608 KB
sample_03.txt AC 132 ms 8616 KB
test_01A.txt AC 129 ms 8488 KB
test_02A.txt AC 130 ms 8536 KB
test_03A.txt AC 129 ms 8488 KB
test_04A.txt AC 133 ms 8612 KB
test_05A.txt AC 128 ms 8488 KB
test_06.txt AC 126 ms 8608 KB
test_07A.txt AC 127 ms 8488 KB
test_08.txt AC 128 ms 8488 KB
test_09A.txt AC 131 ms 8608 KB
test_10.txt AC 127 ms 8608 KB
test_11A.txt AC 129 ms 8616 KB
test_12.txt AC 130 ms 8612 KB
test_13A.txt AC 132 ms 8520 KB
test_14.txt AC 129 ms 8608 KB
test_15A.txt AC 132 ms 8600 KB
test_16.txt AC 129 ms 8680 KB