結果
| 問題 | No.87 Advent Calendar Problem | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2022-01-27 14:53:37 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 413 bytes | 
| コンパイル時間 | 692 ms | 
| コンパイル使用メモリ | 82,176 KB | 
| 実行使用メモリ | 58,624 KB | 
| 最終ジャッジ日時 | 2024-12-25 12:57:29 | 
| 合計ジャッジ時間 | 2,348 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 2 WA * 22 | 
ソースコード
import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    N = int(input())
    N -= 2014
    ans = 400 * (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()
            
            
            
        