結果

問題 No.897 compαctree
ユーザー kbyskbys
提出日時 2020-03-29 01:35:10
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 288 bytes
コンパイル時間 700 ms
コンパイル使用メモリ 87,012 KB
実行使用メモリ 71,484 KB
最終ジャッジ日時 2023-08-30 18:29:15
合計ジャッジ時間 5,189 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,480 KB
testcase_01 AC 71 ms
71,068 KB
testcase_02 AC 72 ms
71,220 KB
testcase_03 AC 72 ms
71,480 KB
testcase_04 AC 72 ms
71,236 KB
testcase_05 AC 72 ms
71,236 KB
testcase_06 AC 71 ms
71,484 KB
testcase_07 AC 71 ms
71,340 KB
testcase_08 AC 72 ms
71,252 KB
testcase_09 AC 72 ms
71,108 KB
testcase_10 AC 71 ms
71,232 KB
testcase_11 TLE -
testcase_12 -- -
testcase_13 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#897
import sys
input=sys.stdin.readline
def main():
    Q = int(input())
    for i in range(Q):
        tmp = 1
        i = 1
        N,K = map(int,input().split())
        while tmp < N:
            tmp += K**i
            i += 1
        print(i-1)
if __name__ == '__main__':
    main()
0