結果

問題 No.87 Advent Calendar Problem
ユーザー tnodinotnodino
提出日時 2022-03-06 01:16:05
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
TLE  
実行時間 -
コード長 245 bytes
コンパイル時間 87 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 15,872 KB
最終ジャッジ日時 2024-07-20 08:46:47
合計ジャッジ時間 12,810 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample -- * 3
other TLE * 1 -- * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
P = 3
ans = 0
for i in range(2015,N+1):
    if i % 400 == 0:
        P += 2
    elif i % 100 == 0:
        P += 1
    elif i % 4 == 0:
        P += 2
    else:
        P += 1
    P %= 7
    if P == 3:
        ans += 1
print(ans)
0