結果
| 問題 |
No.87 Advent Calendar Problem
|
| コンテスト | |
| ユーザー |
lam6er
|
| 提出日時 | 2025-04-15 23:12:14 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 362 bytes |
| コンパイル時間 | 510 ms |
| コンパイル使用メモリ | 81,700 KB |
| 実行使用メモリ | 65,996 KB |
| 最終ジャッジ日時 | 2025-04-15 23:15:09 |
| 合計ジャッジ時間 | 12,957 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / 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)
lam6er