結果
| 問題 |
No.23 技の選択
|
| コンテスト | |
| ユーザー |
norioc
|
| 提出日時 | 2024-10-21 01:33:36 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 74 ms / 5,000 ms |
| コード長 | 307 bytes |
| コンパイル時間 | 362 ms |
| コンパイル使用メモリ | 82,584 KB |
| 実行使用メモリ | 78,304 KB |
| 最終ジャッジ日時 | 2024-10-21 01:33:39 |
| 合計ジャッジ時間 | 3,016 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 33 |
ソースコード
from functools import cache
import sys
sys.setrecursionlimit(10 ** 6)
@cache
def f(h) -> float:
if h <= 0: return 0
# 通常攻撃
res = f(h - A) + 1
# 必殺技
res = min(res, f(h - D) + 3/2)
return res
INF = 1 << 60
H, A, D = map(int, input().split())
ans = f(H)
print(ans)
norioc