結果

問題 No.1593 Perfect Distance
ユーザー とりゐとりゐ
提出日時 2021-07-09 21:23:40
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 151 bytes
コンパイル時間 370 ms
コンパイル使用メモリ 86,972 KB
実行使用メモリ 86,880 KB
最終ジャッジ日時 2023-09-14 07:30:46
合計ジャッジ時間 3,531 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
79,084 KB
testcase_01 AC 74 ms
79,040 KB
testcase_02 AC 73 ms
79,096 KB
testcase_03 AC 77 ms
79,080 KB
testcase_04 AC 72 ms
79,060 KB
testcase_05 AC 74 ms
79,152 KB
testcase_06 AC 76 ms
79,152 KB
testcase_07 AC 74 ms
79,236 KB
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 AC 75 ms
79,328 KB
testcase_18 AC 74 ms
79,332 KB
testcase_19 AC 75 ms
79,152 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

a=[0]*1000000
for i in range(1,1000):
  a[i*i]+=1
ans=0
n=int(input())
for i in range(1,1000):
  if n**2-i**2>0 and a[n**2-i**2]:
    ans+=1
print(ans)
0