結果

問題 No.1593 Perfect Distance
ユーザー gr1msl3ygr1msl3y
提出日時 2021-11-27 17:25:23
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 116 ms / 2,000 ms
コード長 124 bytes
コンパイル時間 349 ms
コンパイル使用メモリ 87,044 KB
実行使用メモリ 107,336 KB
最終ジャッジ日時 2023-09-12 20:43:41
合計ジャッジ時間 4,747 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 67 ms
71,192 KB
testcase_01 AC 67 ms
71,048 KB
testcase_02 AC 66 ms
71,220 KB
testcase_03 AC 65 ms
71,232 KB
testcase_04 AC 68 ms
71,228 KB
testcase_05 AC 68 ms
71,304 KB
testcase_06 AC 68 ms
71,264 KB
testcase_07 AC 67 ms
71,292 KB
testcase_08 AC 68 ms
71,024 KB
testcase_09 AC 92 ms
76,612 KB
testcase_10 AC 78 ms
78,860 KB
testcase_11 AC 82 ms
82,468 KB
testcase_12 AC 89 ms
87,584 KB
testcase_13 AC 88 ms
87,640 KB
testcase_14 AC 91 ms
90,424 KB
testcase_15 AC 105 ms
96,672 KB
testcase_16 AC 116 ms
107,336 KB
testcase_17 AC 69 ms
71,364 KB
testcase_18 AC 69 ms
71,172 KB
testcase_19 AC 68 ms
71,264 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
M = N**2
S = {i**2 for i in range(1, N)}
ans = 0
for i in range(1, N):
    ans += (M-i**2 in S)
print(ans)
0