結果

問題 No.2392 二平方和
ユーザー hato336hato336
提出日時 2023-07-28 22:06:23
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 158 ms / 2,000 ms
コード長 487 bytes
コンパイル時間 242 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 89,716 KB
最終ジャッジ日時 2024-04-16 06:02:30
合計ジャッジ時間 5,330 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 154 ms
89,472 KB
testcase_01 AC 151 ms
89,344 KB
testcase_02 AC 152 ms
89,472 KB
testcase_03 AC 151 ms
89,568 KB
testcase_04 AC 147 ms
89,600 KB
testcase_05 AC 149 ms
89,600 KB
testcase_06 AC 153 ms
89,716 KB
testcase_07 AC 153 ms
89,676 KB
testcase_08 AC 151 ms
89,712 KB
testcase_09 AC 152 ms
89,344 KB
testcase_10 AC 150 ms
89,440 KB
testcase_11 AC 158 ms
89,600 KB
testcase_12 AC 152 ms
89,344 KB
testcase_13 AC 152 ms
89,472 KB
testcase_14 AC 154 ms
89,464 KB
testcase_15 AC 151 ms
89,344 KB
testcase_16 AC 150 ms
89,472 KB
testcase_17 AC 158 ms
89,600 KB
testcase_18 AC 151 ms
89,472 KB
testcase_19 AC 152 ms
89,472 KB
testcase_20 AC 154 ms
89,368 KB
testcase_21 AC 151 ms
89,488 KB
testcase_22 AC 153 ms
89,504 KB
testcase_23 AC 153 ms
89,548 KB
testcase_24 AC 150 ms
89,576 KB
testcase_25 AC 153 ms
89,472 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import collections,sys,math,functools,operator,itertools,bisect,heapq,decimal,string,time,random
#sys.setrecursionlimit(10**9)
n = int(input())
#alist = list(map(int,input().split()))
#alist = []
#s = input()
#n,m = map(int,input().split())
#for i in range(n):
#    alist.append(list(map(int,input().split())))
check = set()
for i in range(1,10**4+100):
    check.add(i**2)
for i in range(1,10**4+100):
    x = n - i**2
    if x in check:
        print('Yes')
        exit()
print('No')
0