結果

問題 No.897 compαctree
ユーザー toshiro_yanagitoshiro_yanagi
提出日時 2020-07-19 21:53:09
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
TLE  
実行時間 -
コード長 172 bytes
コンパイル時間 70 ms
コンパイル使用メモリ 10,696 KB
実行使用メモリ 12,556 KB
最終ジャッジ日時 2023-08-22 15:22:11
合計ジャッジ時間 4,262 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
12,272 KB
testcase_01 AC 16 ms
7,900 KB
testcase_02 AC 16 ms
7,904 KB
testcase_03 AC 15 ms
7,848 KB
testcase_04 AC 14 ms
7,756 KB
testcase_05 AC 15 ms
7,840 KB
testcase_06 AC 15 ms
7,944 KB
testcase_07 AC 15 ms
7,848 KB
testcase_08 AC 14 ms
7,792 KB
testcase_09 AC 14 ms
7,896 KB
testcase_10 AC 14 ms
7,976 KB
testcase_11 TLE -
testcase_12 -- -
testcase_13 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

q = int(input())
for _ in range(q):
    n, k = map(int, input().split())
    ans = 0
    a = 1
    i = 1
    while a < n:
        a += k**i
        i += 1
    print(i - 1)
0