結果
問題 | No.87 Advent Calendar Problem |
ユーザー |
|
提出日時 | 2016-04-30 11:09:23 |
言語 | PyPy2 (7.3.15) |
結果 |
AC
|
実行時間 | 323 ms / 5,000 ms |
コード長 | 335 bytes |
コンパイル時間 | 1,087 ms |
コンパイル使用メモリ | 76,316 KB |
実行使用メモリ | 78,104 KB |
最終ジャッジ日時 | 2024-10-04 23:55:18 |
合計ジャッジ時間 | 5,664 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 |
ソースコード
#coding: utf-8##yuki_87def leap(y):if y%400==0:return Trueif y%100==0:return Falseif y%4==0:return Truereturn Falsen=int(raw_input())x=0y=2014count=0while y<=n:if y+400<=n:y+=400count+=57if x==0:count+=1if leap(y+1)==True:x+=2elif leap(y+1)==False:x+=1x%=7y+=1print count -1