結果

問題 No.1593 Perfect Distance
ユーザー nehan_der_thalnehan_der_thal
提出日時 2021-07-09 21:49:50
言語 PyPy3
(7.3.8)
結果
AC  
実行時間 139 ms / 2,000 ms
コード長 183 bytes
コンパイル時間 269 ms
使用メモリ 112,112 KB
最終ジャッジ日時 2023-02-01 22:59:37
合計ジャッジ時間 4,215 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 134 ms
111,868 KB
testcase_01 AC 131 ms
111,736 KB
testcase_02 AC 133 ms
111,908 KB
testcase_03 AC 130 ms
111,764 KB
testcase_04 AC 132 ms
111,688 KB
testcase_05 AC 131 ms
112,112 KB
testcase_06 AC 131 ms
111,928 KB
testcase_07 AC 132 ms
111,844 KB
testcase_08 AC 134 ms
111,756 KB
testcase_09 AC 135 ms
112,068 KB
testcase_10 AC 132 ms
111,860 KB
testcase_11 AC 134 ms
112,100 KB
testcase_12 AC 133 ms
111,776 KB
testcase_13 AC 135 ms
111,784 KB
testcase_14 AC 138 ms
111,924 KB
testcase_15 AC 139 ms
111,932 KB
testcase_16 AC 131 ms
111,924 KB
testcase_17 AC 132 ms
111,696 KB
testcase_18 AC 131 ms
111,732 KB
testcase_19 AC 132 ms
111,924 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

vs = set()
for i in range(2*10**5):
    vs.add((i+1)**2)

N, = map(int, input().split())
N = N**2
d = 0
for i in range(2*10**5):
    i+=1
    if N-i**2 in vs:
        d += 1
print(d)
0