結果
問題 | No.87 Advent Calendar Problem |
ユーザー |
![]() |
提出日時 | 2025-04-15 23:18:09 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 362 bytes |
コンパイル時間 | 232 ms |
コンパイル使用メモリ | 82,456 KB |
実行使用メモリ | 66,340 KB |
最終ジャッジ日時 | 2025-04-15 23:19:32 |
合計ジャッジ時間 | 12,674 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 3 |
other | TLE * 1 -- * 23 |
ソースコード
n = int(input()) count = 0 base_leap = (2014 // 4) - (2014 // 100) + (2014 // 400) # Precomputed for 2014 for y in range(2015, n + 1): # Calculate the number of leap years from 2015 to y inclusive leap = (y // 4) - (y // 100) + (y // 400) - base_leap total_days = (y - 2014) * 365 + leap if total_days % 7 == 0: count += 1 print(count)