結果
問題 | No.740 幻の木 |
ユーザー |
|
提出日時 | 2018-10-13 17:20:13 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 437 ms / 2,000 ms |
コード長 | 552 bytes |
コンパイル時間 | 137 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-10-12 18:06:48 |
合計ジャッジ時間 | 1,451 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 6 |
ソースコード
l = input().split()l = list(map(int,l))leaves = l[0]fallen = l[1]wind_season = l[2]wind_lasting = l[3]month = 1wind_count = 0count = 0is_wind = Falsewhile True:if leaves <= 0:print(count)breakif month == wind_season:is_wind = Trueif is_wind:wind_count += 1if wind_count > wind_lasting:wind_count = 0is_wind = Falseif is_wind:leaves -= (fallen * 2)else:leaves -= fallencount += 1month += 1if month == 13:month = 1