結果

問題 No.1593 Perfect Distance
ユーザー KeroruKeroru
提出日時 2021-07-10 14:57:55
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 119 ms / 2,000 ms
コード長 103 bytes
コンパイル時間 1,348 ms
コンパイル使用メモリ 86,484 KB
実行使用メモリ 107,368 KB
最終ジャッジ日時 2023-09-14 19:29:41
合計ジャッジ時間 3,810 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
71,068 KB
testcase_01 AC 65 ms
71,016 KB
testcase_02 AC 70 ms
71,228 KB
testcase_03 AC 69 ms
71,316 KB
testcase_04 AC 69 ms
71,120 KB
testcase_05 AC 67 ms
71,132 KB
testcase_06 AC 67 ms
71,320 KB
testcase_07 AC 68 ms
71,356 KB
testcase_08 AC 66 ms
71,064 KB
testcase_09 AC 79 ms
76,408 KB
testcase_10 AC 79 ms
78,924 KB
testcase_11 AC 84 ms
82,360 KB
testcase_12 AC 89 ms
87,600 KB
testcase_13 AC 92 ms
87,692 KB
testcase_14 AC 98 ms
90,536 KB
testcase_15 AC 107 ms
96,480 KB
testcase_16 AC 119 ms
107,368 KB
testcase_17 AC 67 ms
71,348 KB
testcase_18 AC 69 ms
71,132 KB
testcase_19 AC 69 ms
71,236 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
a=0
s=set(x**2 for x in range(1,n))
for x in range(1,n):
 if n**2-x**2in s:a+=1
print(a)
0