結果
問題 |
No.897 compαctree
|
ユーザー |
![]() |
提出日時 | 2022-07-12 14:35:02 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 335 bytes |
コンパイル時間 | 3,077 ms |
コンパイル使用メモリ | 243,656 KB |
実行使用メモリ | 13,760 KB |
最終ジャッジ日時 | 2024-06-23 11:52:26 |
合計ジャッジ時間 | 6,766 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 10 TLE * 1 -- * 2 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define int long long signed main(){ int Q; cin>>Q; for(int i=0;i<Q;i++){ int a,b; cin>>a>>b; int now = b; int ans = 1; int sum = 1; while(sum < a){ sum += now; ans++; now *= b; } cout<<ans-1<<endl; } }