結果

問題 No.2392 二平方和
ユーザー hiryuNhiryuN
提出日時 2023-07-28 21:50:29
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 44 ms / 2,000 ms
コード長 202 bytes
コンパイル時間 405 ms
コンパイル使用メモリ 82,400 KB
実行使用メモリ 60,188 KB
最終ジャッジ日時 2024-04-16 05:43:50
合計ジャッジ時間 2,157 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,280 KB
testcase_01 AC 39 ms
52,484 KB
testcase_02 AC 38 ms
52,988 KB
testcase_03 AC 39 ms
53,600 KB
testcase_04 AC 38 ms
53,360 KB
testcase_05 AC 38 ms
52,776 KB
testcase_06 AC 38 ms
52,000 KB
testcase_07 AC 38 ms
51,776 KB
testcase_08 AC 38 ms
52,868 KB
testcase_09 AC 38 ms
52,860 KB
testcase_10 AC 38 ms
52,724 KB
testcase_11 AC 38 ms
53,492 KB
testcase_12 AC 38 ms
53,056 KB
testcase_13 AC 39 ms
54,012 KB
testcase_14 AC 38 ms
52,012 KB
testcase_15 AC 38 ms
52,956 KB
testcase_16 AC 38 ms
53,096 KB
testcase_17 AC 38 ms
53,236 KB
testcase_18 AC 38 ms
51,772 KB
testcase_19 AC 37 ms
53,096 KB
testcase_20 AC 44 ms
59,156 KB
testcase_21 AC 44 ms
60,188 KB
testcase_22 AC 44 ms
59,664 KB
testcase_23 AC 44 ms
59,564 KB
testcase_24 AC 44 ms
59,812 KB
testcase_25 AC 43 ms
59,112 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
if n==2:
    print("Yes")
    exit()
for i in range(1,int(n**(1/2))):
    key=n-i**2
    kay=int(key**(1/2))
    if kay**2==key and key!=0:
        print("Yes")
        exit()
print("No")
0