結果

問題 No.1593 Perfect Distance
ユーザー kamomekamome
提出日時 2021-07-10 17:05:14
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 119 ms / 2,000 ms
コード長 124 bytes
コンパイル時間 267 ms
コンパイル使用メモリ 87,304 KB
実行使用メモリ 107,548 KB
最終ジャッジ日時 2023-09-14 19:43:10
合計ジャッジ時間 3,086 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,356 KB
testcase_01 AC 68 ms
71,192 KB
testcase_02 AC 67 ms
71,372 KB
testcase_03 AC 66 ms
71,460 KB
testcase_04 AC 70 ms
71,196 KB
testcase_05 AC 67 ms
71,408 KB
testcase_06 AC 68 ms
71,424 KB
testcase_07 AC 67 ms
71,104 KB
testcase_08 AC 68 ms
71,228 KB
testcase_09 AC 75 ms
76,692 KB
testcase_10 AC 76 ms
79,116 KB
testcase_11 AC 82 ms
82,608 KB
testcase_12 AC 89 ms
87,500 KB
testcase_13 AC 89 ms
87,780 KB
testcase_14 AC 94 ms
90,836 KB
testcase_15 AC 104 ms
96,804 KB
testcase_16 AC 119 ms
107,548 KB
testcase_17 AC 67 ms
71,260 KB
testcase_18 AC 66 ms
71,092 KB
testcase_19 AC 68 ms
71,368 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
ans = 0
x = set(i**2 for i in range(1, N+1))

for i in x:
    if N**2-i in x:
        ans += 1

print(ans)
0