結果

問題 No.2416 vs Slime
ユーザー グミ
提出日時 2023-08-12 13:38:45
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 38 ms / 2,000 ms
コード長 165 bytes
コンパイル時間 176 ms
コンパイル使用メモリ 82,604 KB
実行使用メモリ 52,136 KB
最終ジャッジ日時 2024-11-19 15:46:53
合計ジャッジ時間 2,476 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 37
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
	h,a=map(int,input().split())
	c = 1
	ans = 0
	hp = h
	while hp > 0:
		ans += c
		hp = int(hp/a)
		c *= 2
	print(ans)

if __name__ == "__main__":
	main()
0