結果

問題 No.897 compαctree
ユーザー kpinkcat
提出日時 2023-08-23 13:14:47
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 375 bytes
コンパイル時間 945 ms
コンパイル使用メモリ 101,400 KB
最終ジャッジ日時 2025-02-16 12:31:57
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 3 WA * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<map>
#include<vector>
#include <algorithm>
#include<math.h>
#include <iomanip>
#include<set>
#include <numeric>
using namespace std;


int main()
{
    int n;
    cin >> n;
    for (int i = 0; i < n; i++){
        int n, k;
        cin >> n >> k;
        if (k != 1) cout << ceil(pow(n, 1./k)) << endl;
        else cout << n - 1 << endl;
    }
}
0