結果
問題 | No.740 幻の木 |
ユーザー |
![]() |
提出日時 | 2019-09-09 15:48:57 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 190 ms / 2,000 ms |
コード長 | 331 bytes |
コンパイル時間 | 129 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-06-28 12:24:11 |
合計ジャッジ時間 | 1,173 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 6 |
ソースコード
def main():n,m,p,q = map(int,input().split())twice = [x %13 for x in range(p,p+q)]cur = 1 #現在の月cnt = 0#経過した月while n>0:if cur in twice:n -=2*melse:n -=mcur+=1cur%=13if cur ==0:cur=1cnt+=1print(cnt)main()