結果
問題 |
No.897 compαctree
|
ユーザー |
![]() |
提出日時 | 2020-06-15 02:56:26 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 42 ms / 2,000 ms |
コード長 | 225 bytes |
コンパイル時間 | 169 ms |
コンパイル使用メモリ | 82,048 KB |
実行使用メモリ | 52,244 KB |
最終ジャッジ日時 | 2024-06-28 12:51:43 |
合計ジャッジ時間 | 1,497 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 13 |
ソースコード
q = int(input()) for i in range(q): n, k = map(int, input().split()) if k == 1: print(n-1) continue for d in range(10**9): if (k**d-1)//(k-1) >= n: print(d-1) break