結果
問題 |
No.23 技の選択
|
ユーザー |
![]() |
提出日時 | 2021-11-09 02:32:01 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 66 ms / 5,000 ms |
コード長 | 335 bytes |
コンパイル時間 | 316 ms |
コンパイル使用メモリ | 82,196 KB |
実行使用メモリ | 71,372 KB |
最終ジャッジ日時 | 2024-11-17 08:05:46 |
合計ジャッジ時間 | 3,076 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 33 |
ソースコード
import sys import io, os sys.setrecursionlimit(10**9) input = io.BytesIO(os.read(0,os.fstat(0).st_size)).readline h, a, d = map(int, input().split()) memo = {} def rec(x): if x in memo: return memo[x] if x <= 0: return 0 res = min(rec(x-a)+1, rec(x-d)+3/2) memo[x] = res return res print(rec(h))