結果
| 問題 |
No.2392 二平方和
|
| コンテスト | |
| ユーザー |
cubinglover
|
| 提出日時 | 2023-07-28 21:23:14 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 306 bytes |
| コンパイル時間 | 643 ms |
| コンパイル使用メモリ | 78,968 KB |
| 最終ジャッジ日時 | 2025-02-15 19:56:23 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 26 |
ソースコード
#include<iostream>
#include<cmath>
using namespace std;
struct edge{
int to, a, b;
};
int main(){
long long p;cin>>p;
for(long long i=1;i<10000;++i){
long long x=p-i*i;
if(x<0)break;
long long t=sqrtl(x);
if(t*t==x){
cout<<"Yes"<<endl;
return 0;
}
}
cout<<"No"<<endl;
return 0;
}
cubinglover