結果

問題 No.897 compαctree
ユーザー _KingdomOfMoray
提出日時 2020-01-08 20:03:42
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
TLE  
実行時間 -
コード長 305 bytes
コンパイル時間 110 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 21,504 KB
最終ジャッジ日時 2024-11-23 03:05:26
合計ジャッジ時間 10,072 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 10 TLE * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

def query_calc(n, k):
    nodes_per_stair = k ** 0
    ever_nodes = 1
    deep = 0

    while ever_nodes < n:
        deep += 1
        nodes_per_stair *= k
        ever_nodes += nodes_per_stair

    print(deep)

q = int(input())
for i in range(q):
    n, k = map(int,input().split())
    query_calc(n, k)
0