結果

問題 No.1593 Perfect Distance
ユーザー neterukunneterukun
提出日時 2021-07-09 21:26:35
言語 PyPy3
(7.3.8)
結果
AC  
実行時間 116 ms / 2,000 ms
コード長 157 bytes
コンパイル時間 265 ms
使用メモリ 81,268 KB
最終ジャッジ日時 2023-02-01 22:02:54
合計ジャッジ時間 3,432 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 86 ms
80,004 KB
testcase_01 AC 84 ms
80,628 KB
testcase_02 AC 85 ms
80,552 KB
testcase_03 AC 85 ms
80,676 KB
testcase_04 AC 85 ms
80,628 KB
testcase_05 AC 85 ms
80,912 KB
testcase_06 AC 84 ms
80,708 KB
testcase_07 AC 85 ms
80,628 KB
testcase_08 AC 88 ms
80,788 KB
testcase_09 AC 93 ms
81,228 KB
testcase_10 AC 92 ms
81,140 KB
testcase_11 AC 99 ms
81,040 KB
testcase_12 AC 105 ms
81,268 KB
testcase_13 AC 106 ms
81,204 KB
testcase_14 AC 107 ms
81,192 KB
testcase_15 AC 114 ms
81,268 KB
testcase_16 AC 116 ms
81,172 KB
testcase_17 AC 84 ms
80,596 KB
testcase_18 AC 86 ms
80,956 KB
testcase_19 AC 84 ms
80,600 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())


res = 0
for y in range(1, 200010):
    ans = n ** 2 - y ** 2
    if ans > 0 and int(ans ** 0.5) == ans ** 0.5:
        res += 1
print(res)
0