結果
| 問題 | No.740 幻の木 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-10-13 17:20:13 |
| 言語 | Python3 (3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 306 ms / 2,000 ms |
| + 535µs | |
| コード長 | 552 bytes |
| 記録 | |
| コンパイル時間 | 68 ms |
| コンパイル使用メモリ | 14,848 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2026-10-14 20:42:35 |
| 合計ジャッジ時間 | 2,039 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 7 |
ソースコード
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 leaves <= 0:
print(count)
break
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
count += 1
month += 1
if month == 13:
month = 1