結果
問題 | No.897 compαctree |
ユーザー |
![]() |
提出日時 | 2019-10-04 21:23:53 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 218 bytes |
コンパイル時間 | 720 ms |
コンパイル使用メモリ | 66,188 KB |
最終ジャッジ日時 | 2025-01-07 20:20:04 |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | WA * 10 TLE * 3 |
ソースコード
#include <iostream> using namespace std; int main(){ int Q; cin >> Q; while(Q--){ int N, K; cin >> N >> K; int t = 1, ans = -1; while(N > 0) N -= t, t *= K, ++ans; cout << ans << endl; } }