結果
問題 |
No.897 compαctree
|
ユーザー |
![]() |
提出日時 | 2024-10-04 01:11:56 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 470 bytes |
コンパイル時間 | 3,056 ms |
コンパイル使用メモリ | 244,128 KB |
実行使用メモリ | 13,636 KB |
最終ジャッジ日時 | 2024-10-04 01:12:03 |
合計ジャッジ時間 | 6,666 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 10 TLE * 1 -- * 2 |
ソースコード
#include <bits/stdc++.h> using namespace std; #ifdef LOCAL #include "settings/debug.cpp" #else #define Debug(...) void(0) #endif #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using ull = unsigned long long; int main() { int q; cin >> q; while (q--) { ll n, k; cin >> n >> k; ll ans = 0, now = 1, cnt = 1; while (cnt < n) { ans++; now *= k; cnt += now; } cout << ans << endl; } return 0; }