結果

問題 No.2416 vs Slime
ユーザー dmasupro
提出日時 2023-08-12 14:02:37
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 42 ms / 2,000 ms
コード長 144 bytes
コンパイル時間 373 ms
コンパイル使用メモリ 82,296 KB
実行使用メモリ 52,096 KB
最終ジャッジ日時 2024-11-19 17:07:52
合計ジャッジ時間 3,020 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 37
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
H, A = list(map(int, input().split()))
ans = 0
depth = 0
while H >=1:
    ans += 2**depth
    H //= A
    depth += 1
    
print(ans)
0