結果
| 問題 |
No.897 compαctree
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-04-25 14:48:57 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 334 bytes |
| コンパイル時間 | 1,974 ms |
| コンパイル使用メモリ | 193,476 KB |
| 最終ジャッジ日時 | 2025-01-10 01:05:54 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 10 TLE * 3 |
ソースコード
typedef long long ll;
#include <bits/stdc++.h>
using namespace std;
int main() {
ll q;
std::cin >> q;
for (int i = 0; i < q; i++) {
ll n,k;
std::cin >> n>>k;
ll cnt = 0;
while(n>0){
n-= pow(k,cnt);
cnt++;
}
std::cout << cnt-1 << std::endl;
}
}