結果
| 問題 |
No.897 compαctree
|
| コンテスト | |
| ユーザー |
hitonanode
|
| 提出日時 | 2019-10-22 21:16:07 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 378 bytes |
| コンパイル時間 | 1,617 ms |
| コンパイル使用メモリ | 165,136 KB |
| 実行使用メモリ | 10,624 KB |
| 最終ジャッジ日時 | 2024-07-04 19:13:57 |
| 合計ジャッジ時間 | 4,965 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 10 TLE * 1 -- * 2 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using lint = long long int;
#define FOR(i, begin, end) for(int i=(begin),i##_end_=(end);i<i##_end_;i++)
#define REP(i, n) FOR(i,0,n)
int main()
{
lint Q, N, K;
cin >> Q;
REP(_, Q)
{
cin >> N >> K;
lint ret = 0, a = 1;
while (a < N) ret++, a = a * K + 1;
cout << ret << endl;
}
}
hitonanode