結果

問題 No.1593 Perfect Distance
ユーザー TomoyarnTomoyarn
提出日時 2022-02-13 17:06:07
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 108 ms / 2,000 ms
コード長 183 bytes
コンパイル時間 550 ms
コンパイル使用メモリ 86,908 KB
実行使用メモリ 76,952 KB
最終ジャッジ日時 2023-09-11 15:36:09
合計ジャッジ時間 3,849 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 99 ms
76,816 KB
testcase_01 AC 102 ms
76,456 KB
testcase_02 AC 100 ms
76,456 KB
testcase_03 AC 100 ms
76,508 KB
testcase_04 AC 99 ms
76,352 KB
testcase_05 AC 98 ms
76,460 KB
testcase_06 AC 99 ms
76,476 KB
testcase_07 AC 99 ms
76,884 KB
testcase_08 AC 100 ms
76,620 KB
testcase_09 AC 107 ms
76,952 KB
testcase_10 AC 104 ms
76,648 KB
testcase_11 AC 108 ms
76,792 KB
testcase_12 AC 103 ms
76,932 KB
testcase_13 AC 104 ms
76,712 KB
testcase_14 AC 105 ms
76,660 KB
testcase_15 AC 104 ms
76,700 KB
testcase_16 AC 94 ms
76,808 KB
testcase_17 AC 100 ms
76,476 KB
testcase_18 AC 99 ms
76,404 KB
testcase_19 AC 98 ms
76,496 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#yukicoder1593

N = int(input()) ** 2
ans = 0

for i in range(1, 200001):
    j = int(((N - (i ** 2)) ** 0.5).real)
    if i ** 2 + j ** 2 == N and j > 0:
        ans += 1

print(ans)
0