結果

問題 No.23 技の選択
ユーザー ああいいああいい
提出日時 2022-03-31 21:06:47
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 40 ms / 5,000 ms
コード長 274 bytes
コンパイル時間 273 ms
コンパイル使用メモリ 82,180 KB
実行使用メモリ 53,408 KB
最終ジャッジ日時 2024-04-28 18:16:54
合計ジャッジ時間 2,977 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,408 KB
testcase_01 AC 37 ms
52,428 KB
testcase_02 AC 37 ms
51,812 KB
testcase_03 AC 37 ms
52,744 KB
testcase_04 AC 39 ms
52,352 KB
testcase_05 AC 38 ms
52,428 KB
testcase_06 AC 37 ms
52,500 KB
testcase_07 AC 38 ms
52,724 KB
testcase_08 AC 37 ms
53,020 KB
testcase_09 AC 38 ms
52,404 KB
testcase_10 AC 37 ms
53,056 KB
testcase_11 AC 40 ms
52,872 KB
testcase_12 AC 37 ms
52,028 KB
testcase_13 AC 37 ms
52,480 KB
testcase_14 AC 38 ms
52,576 KB
testcase_15 AC 37 ms
52,548 KB
testcase_16 AC 37 ms
52,688 KB
testcase_17 AC 38 ms
51,816 KB
testcase_18 AC 38 ms
52,176 KB
testcase_19 AC 38 ms
52,332 KB
testcase_20 AC 37 ms
52,616 KB
testcase_21 AC 38 ms
52,632 KB
testcase_22 AC 37 ms
52,076 KB
testcase_23 AC 38 ms
53,180 KB
testcase_24 AC 37 ms
53,112 KB
testcase_25 AC 38 ms
52,836 KB
testcase_26 AC 38 ms
53,316 KB
testcase_27 AC 38 ms
52,508 KB
testcase_28 AC 38 ms
52,468 KB
testcase_29 AC 38 ms
52,808 KB
testcase_30 AC 38 ms
52,208 KB
testcase_31 AC 39 ms
52,488 KB
testcase_32 AC 38 ms
52,492 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