結果
| 問題 | No.897 compαctree |
| コンテスト | |
| ユーザー |
fV9TwBhUoa9S3eV
|
| 提出日時 | 2019-10-31 09:10:42 |
| 言語 | Python3 (3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 20 ms / 2,000 ms |
| + 241µs | |
| コード長 | 381 bytes |
| 記録 | |
| コンパイル時間 | 59 ms |
| コンパイル使用メモリ | 14,976 KB |
| 実行使用メモリ | 11,008 KB |
| 最終ジャッジ日時 | 2026-10-12 07:33:27 |
| 合計ジャッジ時間 | 1,460 ms |
|
ジャッジサーバーID (参考情報) |
judge4_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 15 |
ソースコード
# No.897 compαctree
q = int(input())
n = []
k = []
for i in range(q):
tmp = [int(s) for s in input().split()]
n.append(tmp[0])
k.append(tmp[1])
for i in range(q):
if k[i] == 1:
print(n[i] - 1)
else:
depth = 1
points = 1
while points < n[i]:
points += k[i] ** depth
depth += 1
print(depth - 1)
fV9TwBhUoa9S3eV