結果

問題 No.23 技の選択
ユーザー ああいいああいい
提出日時 2022-03-31 21:06:47
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 71 ms / 5,000 ms
コード長 274 bytes
コンパイル時間 1,484 ms
コンパイル使用メモリ 87,060 KB
実行使用メモリ 71,684 KB
最終ジャッジ日時 2023-08-11 01:08:15
合計ジャッジ時間 5,213 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
71,520 KB
testcase_01 AC 68 ms
71,224 KB
testcase_02 AC 68 ms
71,236 KB
testcase_03 AC 71 ms
71,376 KB
testcase_04 AC 70 ms
71,216 KB
testcase_05 AC 68 ms
71,324 KB
testcase_06 AC 68 ms
71,112 KB
testcase_07 AC 68 ms
71,348 KB
testcase_08 AC 71 ms
71,280 KB
testcase_09 AC 69 ms
71,184 KB
testcase_10 AC 69 ms
71,136 KB
testcase_11 AC 68 ms
71,400 KB
testcase_12 AC 67 ms
71,396 KB
testcase_13 AC 69 ms
71,336 KB
testcase_14 AC 69 ms
71,600 KB
testcase_15 AC 69 ms
71,300 KB
testcase_16 AC 67 ms
71,460 KB
testcase_17 AC 68 ms
71,476 KB
testcase_18 AC 69 ms
71,460 KB
testcase_19 AC 69 ms
71,424 KB
testcase_20 AC 66 ms
71,396 KB
testcase_21 AC 68 ms
71,216 KB
testcase_22 AC 69 ms
71,360 KB
testcase_23 AC 67 ms
71,520 KB
testcase_24 AC 68 ms
71,524 KB
testcase_25 AC 69 ms
71,384 KB
testcase_26 AC 69 ms
71,684 KB
testcase_27 AC 69 ms
71,376 KB
testcase_28 AC 68 ms
71,408 KB
testcase_29 AC 69 ms
71,480 KB
testcase_30 AC 69 ms
71,528 KB
testcase_31 AC 68 ms
71,324 KB
testcase_32 AC 69 ms
71,248 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

H,A,D = map(int,input().split())

ans = 10 ** 10
i = 0
while True:
    tmp = i
    h = H - A * i
    if h <= 0:
        if tmp < ans:
            ans = tmp
        break
    q = (h + D - 1) // D
    tmp += q * 3 / 2
    if tmp < ans:
        ans = tmp
    i += 1
print(ans)
0