結果

問題 No.897 compαctree
ユーザー caleicalei
提出日時 2020-01-18 16:01:51
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 201 bytes
コンパイル時間 407 ms
コンパイル使用メモリ 10,516 KB
実行使用メモリ 12,528 KB
最終ジャッジ日時 2023-09-09 23:14:23
合計ジャッジ時間 4,675 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
12,116 KB
testcase_01 AC 15 ms
7,804 KB
testcase_02 AC 15 ms
7,868 KB
testcase_03 AC 15 ms
7,796 KB
testcase_04 AC 15 ms
7,872 KB
testcase_05 AC 14 ms
7,800 KB
testcase_06 AC 15 ms
7,812 KB
testcase_07 AC 15 ms
7,740 KB
testcase_08 AC 15 ms
7,900 KB
testcase_09 AC 15 ms
7,820 KB
testcase_10 AC 15 ms
7,772 KB
testcase_11 TLE -
testcase_12 -- -
testcase_13 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

# 2020/01/18

q=int(input())

def solve(n,K):
    i=0
    res=0
    while n>res:
        res+=k**i
        i+=1
    return i-1

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