結果
| 問題 |
No.2416 vs Slime
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-08-12 13:39:00 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 48 ms / 2,000 ms |
| コード長 | 461 bytes |
| コンパイル時間 | 104 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 12,032 KB |
| 最終ジャッジ日時 | 2024-11-19 15:47:10 |
| 合計ジャッジ時間 | 3,071 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 37 |
ソースコード
import sys
import logging
import math
input = sys.stdin.readline
logger = logging.getLogger(__name__)
def read():
H, A = map(int, input().strip().split())
return H, A
def solve(H, A):
ans = 0
n_slimes = 1
while H > 0:
H //= A
ans += n_slimes
n_slimes <<= 1
return ans
if __name__ == "__main__":
inputs = read()
outputs = solve(*inputs)
if outputs is not None:
print("%s" % str(outputs))