結果

問題 No.897 compαctree
ユーザー ldsybldsyb
提出日時 2019-10-05 15:51:47
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 338 bytes
コンパイル時間 1,848 ms
コンパイル使用メモリ 161,528 KB
実行使用メモリ 13,952 KB
最終ジャッジ日時 2024-04-15 21:13:29
合計ジャッジ時間 7,915 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 TLE -
testcase_01 -- -
testcase_02 -- -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main() {
    int q;
    cin >> q;
    
    for (int _ = 0; _ < q; _++) {
        int64_t n, k;
        cin >> n >> k;
        
        int64_t ans = 0;
        for (int64_t tmp = 1; tmp < n; tmp *= k) {
            ans++;
        }
        cout << ans << endl;
    }
    
    return 0;
}
0