結果
問題 | No.2392 二平方和 |
ユーザー |
|
提出日時 | 2023-07-28 23:00:25 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 226 ms / 2,000 ms |
コード長 | 883 bytes |
コンパイル時間 | 1,695 ms |
コンパイル使用メモリ | 31,360 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-06 20:52:30 |
合計ジャッジ時間 | 3,222 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 26 |
ソースコード
#include<assert.h>#include<complex.h>#include<ctype.h>#include<errno.h>#include<fenv.h>#include<float.h>#include<inttypes.h>#include<iso646.h>#include<limits.h>#include<locale.h>#include<math.h>#include<setjmp.h>#include<signal.h>#include<stdalign.h>#include<stdarg.h>#include<stdatomic.h>#include<stdbool.h>#include<stddef.h>#include<stdint.h>#include<stdio.h>#include<stdlib.h>#include<stdnoreturn.h>#include<string.h>#include<tgmath.h>#include<time.h>#include<wchar.h>#include<wctype.h>int main() {int P;scanf("%d", &P);bool hantei = false;for (int i = 1; i <= sqrt(P); i++) {for (int j = 1; j <= sqrt(P); j++) {if (i * i + j * j == P) {hantei = true;break;}}}if (hantei) {printf("Yes\n");} else {printf("No\n");}}