結果

問題 No.897 compαctree
ユーザー neterukunneterukun
提出日時 2019-10-04 21:26:13
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 199 bytes
コンパイル時間 176 ms
コンパイル使用メモリ 82,596 KB
実行使用メモリ 66,444 KB
最終ジャッジ日時 2024-04-14 10:11:20
合計ジャッジ時間 4,432 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
59,728 KB
testcase_01 AC 39 ms
52,032 KB
testcase_02 AC 38 ms
52,068 KB
testcase_03 AC 38 ms
53,728 KB
testcase_04 AC 38 ms
53,068 KB
testcase_05 AC 38 ms
53,284 KB
testcase_06 AC 37 ms
52,812 KB
testcase_07 AC 39 ms
53,512 KB
testcase_08 AC 38 ms
52,068 KB
testcase_09 AC 39 ms
52,280 KB
testcase_10 AC 39 ms
51,948 KB
testcase_11 TLE -
testcase_12 -- -
testcase_13 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

q = int(input())
info = [list(map(int, input().split())) for i in range(q)]

for i in range(q):
    n, k = info[i]
    ans = 0
    while n > 0:
        n -= k**ans
        ans += 1
    print(ans - 1)
0