結果

問題 No.1593 Perfect Distance
ユーザー teepeeteeteepeetee
提出日時 2021-07-18 15:27:36
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 135 ms / 2,000 ms
コード長 135 bytes
コンパイル時間 244 ms
コンパイル使用メモリ 10,660 KB
実行使用メモリ 25,468 KB
最終ジャッジ日時 2023-09-22 17:50:35
合計ジャッジ時間 3,783 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
25,284 KB
testcase_01 AC 123 ms
25,404 KB
testcase_02 AC 128 ms
25,376 KB
testcase_03 AC 119 ms
25,272 KB
testcase_04 AC 119 ms
25,276 KB
testcase_05 AC 124 ms
25,468 KB
testcase_06 AC 126 ms
25,276 KB
testcase_07 AC 123 ms
25,268 KB
testcase_08 AC 134 ms
25,380 KB
testcase_09 AC 127 ms
25,428 KB
testcase_10 AC 124 ms
25,396 KB
testcase_11 AC 128 ms
25,424 KB
testcase_12 AC 127 ms
25,272 KB
testcase_13 AC 129 ms
25,376 KB
testcase_14 AC 133 ms
25,372 KB
testcase_15 AC 133 ms
25,296 KB
testcase_16 AC 135 ms
25,276 KB
testcase_17 AC 122 ms
25,280 KB
testcase_18 AC 124 ms
25,312 KB
testcase_19 AC 125 ms
25,392 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
xx = {i**2 for i in range(1,200001)}
ans=0

for i in range(1,200001):
    if n**2-i**2 in xx:
        ans+=1
print(ans)
0