結果

問題 No.897 compαctree
ユーザー matrie
提出日時 2020-12-16 09:37:43
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 30 ms / 2,000 ms
コード長 132 bytes
コンパイル時間 138 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,624 KB
最終ジャッジ日時 2024-09-20 04:32:12
合計ジャッジ時間 1,070 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

c=int(input())
for _ in [0]*c:
	t,m=-1,0
	n,k=map(int,input().split())
	if k==1: t=n-1
	else: 
		while n>m: t+=1; m+=k**t	
	print(t)
0