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