結果
| 問題 |
No.897 compαctree
|
| コンテスト | |
| ユーザー |
bal4u
|
| 提出日時 | 2019-10-05 06:31:54 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 298 bytes |
| コンパイル時間 | 284 ms |
| コンパイル使用メモリ | 28,416 KB |
| 実行使用メモリ | 13,636 KB |
| 最終ジャッジ日時 | 2024-10-04 18:58:57 |
| 合計ジャッジ時間 | 3,774 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 10 TLE * 1 -- * 2 |
ソースコード
// yukicoder: No.897 compαctree
// 2019.10.5 bal4u
#include <stdio.h>
typedef long long ll;
int main()
{
int N, K, Q, ans;
ll k, s;
scanf("%d", &Q); while (Q--) {
scanf("%d%d", &N, &K);
s = 1, k = 1, ans = 0;
while (s < N) k *= K, s += k, ans++;
printf("%d\n", ans);
}
return 0;
}
bal4u