結果

問題 No.897 compαctree
ユーザー fV9TwBhUoa9S3eV
提出日時 2019-10-31 09:07:27
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
TLE  
実行時間 -
コード長 305 bytes
コンパイル時間 212 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 16,256 KB
最終ジャッジ日時 2024-09-14 22:00:26
合計ジャッジ時間 4,201 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 10 TLE * 1 -- * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

# 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):
    depth = 1
    points = 1

    while points < n[i]:
        points += k[i] ** depth
        depth += 1

    print(depth - 1)
0