結果

問題 No.1593 Perfect Distance
ユーザー neterukunneterukun
提出日時 2021-07-09 21:26:35
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 110 ms / 2,000 ms
コード長 157 bytes
コンパイル時間 277 ms
コンパイル使用メモリ 86,856 KB
実行使用メモリ 76,836 KB
最終ジャッジ日時 2023-09-14 07:42:50
合計ジャッジ時間 2,955 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
75,656 KB
testcase_01 AC 78 ms
76,076 KB
testcase_02 AC 77 ms
76,040 KB
testcase_03 AC 78 ms
76,028 KB
testcase_04 AC 78 ms
76,280 KB
testcase_05 AC 77 ms
76,232 KB
testcase_06 AC 77 ms
76,036 KB
testcase_07 AC 78 ms
75,964 KB
testcase_08 AC 78 ms
76,096 KB
testcase_09 AC 86 ms
76,524 KB
testcase_10 AC 88 ms
76,544 KB
testcase_11 AC 94 ms
76,444 KB
testcase_12 AC 99 ms
76,740 KB
testcase_13 AC 99 ms
76,688 KB
testcase_14 AC 100 ms
76,692 KB
testcase_15 AC 107 ms
76,836 KB
testcase_16 AC 110 ms
76,688 KB
testcase_17 AC 79 ms
76,016 KB
testcase_18 AC 79 ms
76,244 KB
testcase_19 AC 78 ms
76,208 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