結果
| 問題 |
No.2392 二平方和
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-07-28 21:29:11 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 103 ms / 2,000 ms |
| コード長 | 336 bytes |
| コンパイル時間 | 2,864 ms |
| コンパイル使用メモリ | 244,240 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-06 17:39:39 |
| 合計ジャッジ時間 | 3,906 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 26 |
ソースコード
#include "bits/stdc++.h"
using i64 = std::int_fast64_t;
int main() {
std::cin.tie(nullptr)->sync_with_stdio(false);
i64 x;
std::cin >> x;
for (i64 i = 1; i <= sqrt(x); i++) {
for (i64 j = i; j <= sqrt(x); j++) {
if (i * i + j * j == x) {
std::cout << "Yes\n";
return 0;
}
}
}
std::cout << "No\n";
return 0;
}