結果

問題 No.23 技の選択
ユーザー ayame_pyayame_py
提出日時 2015-10-09 16:16:29
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 258 bytes
コンパイル時間 871 ms
コンパイル使用メモリ 6,624 KB
実行使用メモリ 6,368 KB
最終ジャッジ日時 2023-09-27 08:16:48
合計ジャッジ時間 2,250 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
5,868 KB
testcase_01 AC 10 ms
5,908 KB
testcase_02 AC 10 ms
5,908 KB
testcase_03 AC 14 ms
6,300 KB
testcase_04 AC 17 ms
6,296 KB
testcase_05 AC 15 ms
6,220 KB
testcase_06 AC 14 ms
6,368 KB
testcase_07 AC 11 ms
5,976 KB
testcase_08 AC 12 ms
6,212 KB
testcase_09 AC 13 ms
6,220 KB
testcase_10 AC 11 ms
6,144 KB
testcase_11 AC 9 ms
5,952 KB
testcase_12 AC 10 ms
6,284 KB
testcase_13 WA -
testcase_14 AC 11 ms
6,208 KB
testcase_15 WA -
testcase_16 AC 12 ms
6,100 KB
testcase_17 AC 11 ms
6,292 KB
testcase_18 WA -
testcase_19 AC 13 ms
6,268 KB
testcase_20 AC 10 ms
6,060 KB
testcase_21 AC 12 ms
6,252 KB
testcase_22 AC 10 ms
6,212 KB
testcase_23 AC 11 ms
6,220 KB
testcase_24 AC 11 ms
6,316 KB
testcase_25 AC 12 ms
6,276 KB
testcase_26 AC 11 ms
6,188 KB
testcase_27 AC 13 ms
6,212 KB
testcase_28 AC 11 ms
6,324 KB
testcase_29 AC 12 ms
6,124 KB
testcase_30 AC 12 ms
6,188 KB
testcase_31 AC 11 ms
6,196 KB
testcase_32 AC 11 ms
6,244 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# coding:utf-8
H, A, D = map(int,raw_input().split())

INF = 1e9+7
dp = [INF for _ in range(max(H,A,D)+1)]
for i in range(A+1): dp[i]=1.0
for i in range(A+1, D+1): dp[i]=1.5
for i in range(D+1, max(H,A,D)+1): dp[i]=min(dp[i-A]+1.0, dp[i-D]+1.5)

print dp[H]
0