結果

問題 No.23 技の選択
ユーザー ああいい
提出日時 2022-03-31 21:06:47
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 40 ms / 5,000 ms
コード長 274 bytes
コンパイル時間 496 ms
コンパイル使用メモリ 82,476 KB
実行使用メモリ 52,328 KB
最終ジャッジ日時 2024-11-17 12:54:39
合計ジャッジ時間 3,250 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 33
権限があれば一括ダウンロードができます

ソースコード

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