結果
| 問題 | 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 = 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
            
            
            
        