結果

問題 No.1593 Perfect Distance
ユーザー nehan_der_thalnehan_der_thal
提出日時 2021-07-09 21:49:50
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 128 ms / 2,000 ms
コード長 183 bytes
コンパイル時間 290 ms
コンパイル使用メモリ 86,872 KB
実行使用メモリ 107,428 KB
最終ジャッジ日時 2023-09-14 08:30:08
合計ジャッジ時間 3,906 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
107,232 KB
testcase_01 AC 122 ms
107,136 KB
testcase_02 AC 121 ms
107,068 KB
testcase_03 AC 122 ms
107,228 KB
testcase_04 AC 119 ms
107,228 KB
testcase_05 AC 117 ms
107,280 KB
testcase_06 AC 118 ms
107,036 KB
testcase_07 AC 115 ms
107,156 KB
testcase_08 AC 121 ms
107,128 KB
testcase_09 AC 128 ms
107,396 KB
testcase_10 AC 120 ms
107,088 KB
testcase_11 AC 117 ms
107,192 KB
testcase_12 AC 119 ms
107,284 KB
testcase_13 AC 120 ms
107,428 KB
testcase_14 AC 120 ms
107,376 KB
testcase_15 AC 123 ms
107,428 KB
testcase_16 AC 120 ms
106,880 KB
testcase_17 AC 119 ms
107,236 KB
testcase_18 AC 116 ms
107,188 KB
testcase_19 AC 121 ms
107,140 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