結果
| 問題 |
No.1218 Something Like a Theorem
|
| コンテスト | |
| ユーザー |
尻リハビリ
|
| 提出日時 | 2020-09-10 22:18:31 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 452 bytes |
| コンパイル時間 | 1,084 ms |
| コンパイル使用メモリ | 71,680 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-12-24 04:12:26 |
| 合計ジャッジ時間 | 1,455 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | AC * 4 WA * 12 |
ソースコード
#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;
}
尻リハビリ