結果

問題 No.23 技の選択
ユーザー tktk_snsntktk_snsn
提出日時 2020-12-14 20:26:20
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 42 ms / 5,000 ms
コード長 160 bytes
コンパイル時間 383 ms
コンパイル使用メモリ 11,768 KB
実行使用メモリ 10,440 KB
最終ジャッジ日時 2023-10-20 05:11:54
合計ジャッジ時間 2,884 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
10,060 KB
testcase_01 AC 30 ms
10,060 KB
testcase_02 AC 30 ms
10,060 KB
testcase_03 AC 42 ms
10,440 KB
testcase_04 AC 42 ms
10,280 KB
testcase_05 AC 42 ms
10,224 KB
testcase_06 AC 40 ms
10,376 KB
testcase_07 AC 36 ms
10,120 KB
testcase_08 AC 38 ms
10,288 KB
testcase_09 AC 42 ms
10,436 KB
testcase_10 AC 37 ms
10,100 KB
testcase_11 AC 30 ms
10,060 KB
testcase_12 AC 36 ms
10,088 KB
testcase_13 AC 41 ms
10,124 KB
testcase_14 AC 37 ms
10,096 KB
testcase_15 AC 39 ms
10,108 KB
testcase_16 AC 30 ms
10,060 KB
testcase_17 AC 36 ms
10,088 KB
testcase_18 AC 39 ms
10,104 KB
testcase_19 AC 41 ms
10,120 KB
testcase_20 AC 33 ms
10,064 KB
testcase_21 AC 31 ms
10,064 KB
testcase_22 AC 39 ms
10,220 KB
testcase_23 AC 32 ms
10,064 KB
testcase_24 AC 32 ms
10,060 KB
testcase_25 AC 42 ms
10,412 KB
testcase_26 AC 33 ms
10,088 KB
testcase_27 AC 42 ms
10,412 KB
testcase_28 AC 40 ms
10,132 KB
testcase_29 AC 40 ms
10,316 KB
testcase_30 AC 42 ms
10,124 KB
testcase_31 AC 41 ms
10,124 KB
testcase_32 AC 41 ms
10,208 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

H, A, D = map(int, input().split())
dp = [0] * (H + 1)
for i in reversed(range(H)):
    dp[i] = min(1 + dp[min(H, i + A)], 1.5 + dp[min(H, i + D)])
print(dp[0])
0