結果

問題 No.897 compαctree
ユーザー NoaSaber
提出日時 2021-04-05 22:21:41
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 183 bytes
コンパイル時間 158 ms
コンパイル使用メモリ 82,524 KB
実行使用メモリ 112,220 KB
最終ジャッジ日時 2025-01-01 20:16:56
合計ジャッジ時間 10,274 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 10 TLE * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

q=int(input())
for i in range(q):
    a,b=map(int,input().split())
    phase=0
    while a>=0:
        a-=b**phase
        if a<=0:
            break
        phase+=1
    print(phase)
0