結果

問題 No.23 技の選択
ユーザー KudeKude
提出日時 2020-09-04 16:18:19
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 73 ms / 5,000 ms
コード長 188 bytes
コンパイル時間 243 ms
コンパイル使用メモリ 87,264 KB
実行使用メモリ 76,344 KB
最終ジャッジ日時 2023-08-17 06:44:23
合計ジャッジ時間 3,953 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,448 KB
testcase_01 AC 65 ms
71,604 KB
testcase_02 AC 65 ms
71,448 KB
testcase_03 AC 71 ms
76,128 KB
testcase_04 AC 70 ms
75,884 KB
testcase_05 AC 67 ms
75,840 KB
testcase_06 AC 71 ms
75,808 KB
testcase_07 AC 71 ms
76,112 KB
testcase_08 AC 73 ms
76,136 KB
testcase_09 AC 72 ms
76,116 KB
testcase_10 AC 71 ms
76,112 KB
testcase_11 AC 67 ms
71,312 KB
testcase_12 AC 70 ms
75,916 KB
testcase_13 AC 70 ms
76,180 KB
testcase_14 AC 70 ms
76,028 KB
testcase_15 AC 70 ms
75,956 KB
testcase_16 AC 66 ms
71,288 KB
testcase_17 AC 68 ms
75,788 KB
testcase_18 AC 72 ms
76,068 KB
testcase_19 AC 71 ms
76,252 KB
testcase_20 AC 69 ms
75,764 KB
testcase_21 AC 67 ms
75,976 KB
testcase_22 AC 72 ms
76,076 KB
testcase_23 AC 68 ms
75,912 KB
testcase_24 AC 66 ms
71,288 KB
testcase_25 AC 72 ms
76,068 KB
testcase_26 AC 71 ms
76,176 KB
testcase_27 AC 72 ms
76,020 KB
testcase_28 AC 70 ms
76,008 KB
testcase_29 AC 72 ms
75,980 KB
testcase_30 AC 69 ms
76,052 KB
testcase_31 AC 71 ms
76,008 KB
testcase_32 AC 72 ms
76,344 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

h, a, d = map(int, input().split())
dp = [0] * (h + 1)
for i in range(1, h + 1):
    dp[i] = min(2 + dp[max(0, i - a)], 3 + dp[max(0, i - d)])
print(dp[h] / 2 if dp[i] % 2 else dp[h] // 2)
0