結果

問題 No.1218 Something Like a Theorem
ユーザー 尻リハビリ尻リハビリ
提出日時 2020-09-10 22:18:31
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 452 bytes
コンパイル時間 566 ms
コンパイル使用メモリ 70,460 KB
実行使用メモリ 4,508 KB
最終ジャッジ日時 2023-08-25 18:21:28
合計ジャッジ時間 1,539 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 1 ms
4,376 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 1 ms
4,376 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 1 ms
4,376 KB
testcase_17 AC 1 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <utility>
#include <vector>
#include <string>
#include <cstdio>
#include <cmath>


using namespace std;

int main(){

   long long int n,z;
   cin>>n>>z;
   string ans="No";

    for (long long int i=1;i<pow(z,n);i++){
        float a=pow(z,n)-pow(i,n);
        a=pow(a,1/n);
        cout<<a<<endl;
        if(a==int(a)&&a>0){
            ans="Yes";
            break;
        }
    }

    cout<<ans<<endl;
    

   
    
}
0