結果

問題 No.1593 Perfect Distance
ユーザー とりゐとりゐ
提出日時 2021-07-09 21:37:57
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 143 bytes
コンパイル時間 399 ms
コンパイル使用メモリ 87,096 KB
実行使用メモリ 86,980 KB
最終ジャッジ日時 2023-09-14 08:04:31
合計ジャッジ時間 3,564 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
79,004 KB
testcase_01 AC 74 ms
79,296 KB
testcase_02 AC 75 ms
79,140 KB
testcase_03 AC 80 ms
79,164 KB
testcase_04 AC 77 ms
79,288 KB
testcase_05 AC 74 ms
79,184 KB
testcase_06 AC 77 ms
79,008 KB
testcase_07 AC 74 ms
79,364 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 73 ms
79,092 KB
testcase_18 AC 78 ms
78,996 KB
testcase_19 AC 73 ms
79,216 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 i<n and a[n**2-i**2]:
    ans+=1
print(ans)
0