結果

問題 No.2392 二平方和
ユーザー rankturniprankturnip
提出日時 2023-07-31 09:19:17
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 44 ms / 2,000 ms
コード長 168 bytes
コンパイル時間 365 ms
コンパイル使用メモリ 82,560 KB
実行使用メモリ 59,404 KB
最終ジャッジ日時 2024-04-18 09:48:05
合計ジャッジ時間 2,292 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
51,884 KB
testcase_01 AC 36 ms
52,480 KB
testcase_02 AC 37 ms
52,420 KB
testcase_03 AC 38 ms
52,696 KB
testcase_04 AC 35 ms
52,816 KB
testcase_05 AC 41 ms
52,436 KB
testcase_06 AC 36 ms
52,884 KB
testcase_07 AC 35 ms
52,500 KB
testcase_08 AC 35 ms
53,696 KB
testcase_09 AC 40 ms
52,748 KB
testcase_10 AC 40 ms
52,664 KB
testcase_11 AC 36 ms
52,676 KB
testcase_12 AC 38 ms
53,196 KB
testcase_13 AC 34 ms
52,556 KB
testcase_14 AC 36 ms
53,196 KB
testcase_15 AC 34 ms
53,620 KB
testcase_16 AC 37 ms
53,696 KB
testcase_17 AC 33 ms
53,264 KB
testcase_18 AC 37 ms
52,892 KB
testcase_19 AC 35 ms
52,368 KB
testcase_20 AC 43 ms
59,060 KB
testcase_21 AC 42 ms
59,048 KB
testcase_22 AC 39 ms
59,404 KB
testcase_23 AC 41 ms
58,772 KB
testcase_24 AC 38 ms
58,552 KB
testcase_25 AC 44 ms
59,036 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
import math
p=int(input())
for i in range(1,math.floor(math.sqrt(2*p)/2)+1):
	j=p-i**2
	if math.sqrt(j).is_integer():
		print("Yes")
		sys.exit()
print("No")
0