結果
問題 | No.897 compαctree |
ユーザー |
![]() |
提出日時 | 2020-01-20 21:49:10 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 273 bytes |
コンパイル時間 | 1,495 ms |
コンパイル使用メモリ | 167,212 KB |
実行使用メモリ | 10,524 KB |
最終ジャッジ日時 | 2024-07-02 23:11:40 |
合計ジャッジ時間 | 5,187 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 10 TLE * 1 -- * 2 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { int n; cin>>n; for(int idx=0;idx<n;++idx){ ll a,b; cin>>a>>b; ll cnt=0; ll sum=1; while(a>sum){ ++cnt; sum+=pow(b,cnt); } cout<<cnt<<endl; } }