結果
問題 |
No.1218 Something Like a Theorem
|
ユーザー |
![]() |
提出日時 | 2020-09-10 22:15:40 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 426 bytes |
コンパイル時間 | 741 ms |
コンパイル使用メモリ | 71,168 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-24 04:07:48 |
合計ジャッジ時間 | 1,601 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 15 WA * 1 |
ソースコード
#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=sqrt(a); if(a==int(a)&&a>0){ ans="Yes"; break; } } cout<<ans<<endl; }