結果
| 問題 |
No.2416 vs Slime
|
| コンテスト | |
| ユーザー |
norioc
|
| 提出日時 | 2023-08-12 14:27:52 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 48 ms / 2,000 ms |
| コード長 | 193 bytes |
| コンパイル時間 | 513 ms |
| コンパイル使用メモリ | 82,432 KB |
| 実行使用メモリ | 55,168 KB |
| 最終ジャッジ日時 | 2024-11-19 19:39:22 |
| 合計ジャッジ時間 | 3,166 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 37 |
ソースコード
from functools import lru_cache
H, A = map(int, input().split())
@lru_cache(maxsize=None)
def f(h):
if h == 0: return 0
x = h // A
return f(x) + f(x) + 1
ans = f(H)
print(ans)
norioc