結果

問題 No.740 幻の木
ユーザー sobasssysobasssy
提出日時 2019-01-07 17:02:17
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 261 ms / 2,000 ms
コード長 474 bytes
コンパイル時間 220 ms
コンパイル使用メモリ 10,756 KB
実行使用メモリ 7,872 KB
最終ジャッジ日時 2023-08-15 16:32:19
合計ジャッジ時間 1,253 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,752 KB
testcase_01 AC 14 ms
7,844 KB
testcase_02 AC 14 ms
7,808 KB
testcase_03 AC 14 ms
7,796 KB
testcase_04 AC 15 ms
7,872 KB
testcase_05 AC 15 ms
7,792 KB
testcase_06 AC 261 ms
7,740 KB
testcase_07 AC 15 ms
7,768 KB
testcase_08 AC 15 ms
7,868 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

chars = input().split(" ")

leaves = int(chars[0])
per_lost = int(chars[1])

month_list = []
for x in range(int(chars[2]), int(chars[2]) + int(chars[3])):
    month_list.append(x)

if 12 in month_list:
    month_list.remove(12)
    month_list.append(0)

counter = 0

while True:
    if leaves <= 0:
        print(counter)
        break
    else:
        counter += 1

    if (counter % 12) in month_list:
        leaves -= per_lost * 2
    else:
        leaves -= per_lost

0