結果
問題 | No.87 Advent Calendar Problem |
ユーザー |
![]() |
提出日時 | 2016-05-14 18:46:48 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 35 ms / 5,000 ms |
コード長 | 411 bytes |
コンパイル時間 | 209 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 11,264 KB |
最終ジャッジ日時 | 2024-10-06 02:46:21 |
合計ジャッジ時間 | 2,044 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 |
ソースコード
import calendarN = int(input())def get_swt(start, end):count = 0for year in range(start, end):fw = calendar.weekday(year, 7, 23)if w == fw:count += 1return countw = calendar.weekday(2014, 7, 23)x = 57if N <= 2400:c = get_swt(2015, N+1)print(c)else:a, b = divmod(N-2400, 400)ax = a*xc = get_swt(2400, 2400+b+1)print(c+ ax + 54)