結果
| 問題 |
No.87 Advent Calendar Problem
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-01-27 14:56:08 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 41 ms / 5,000 ms |
| コード長 | 413 bytes |
| コンパイル時間 | 184 ms |
| コンパイル使用メモリ | 82,300 KB |
| 実行使用メモリ | 59,908 KB |
| 最終ジャッジ日時 | 2024-12-25 13:01:19 |
| 合計ジャッジ時間 | 2,112 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 24 |
ソースコード
import sys
def input(): return sys.stdin.readline().rstrip()
def main():
N = int(input())
N -= 2014
ans = 399 * (N//2800)
N %= 2800
cnt = 0
for i in range(2015, 2015+N):
if i % 400 == 0 or (i % 100 != 0 and i % 4 == 0):
cnt += 2
else:
cnt += 1
if cnt % 7 == 0:
ans += 1
print(ans)
if __name__ == '__main__':
main()