結果

問題 No.1593 Perfect Distance
ユーザー harapecoharapeco
提出日時 2022-04-07 10:49:51
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 85 ms / 2,000 ms
コード長 135 bytes
コンパイル時間 261 ms
コンパイル使用メモリ 87,292 KB
実行使用メモリ 76,568 KB
最終ジャッジ日時 2023-08-18 16:47:40
合計ジャッジ時間 2,681 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 63 ms
71,500 KB
testcase_01 AC 62 ms
71,412 KB
testcase_02 AC 65 ms
71,252 KB
testcase_03 AC 65 ms
71,616 KB
testcase_04 AC 64 ms
71,448 KB
testcase_05 AC 70 ms
71,652 KB
testcase_06 AC 64 ms
71,580 KB
testcase_07 AC 62 ms
71,772 KB
testcase_08 AC 65 ms
71,660 KB
testcase_09 AC 72 ms
76,568 KB
testcase_10 AC 68 ms
76,260 KB
testcase_11 AC 73 ms
76,368 KB
testcase_12 AC 77 ms
76,516 KB
testcase_13 AC 75 ms
76,172 KB
testcase_14 AC 77 ms
76,568 KB
testcase_15 AC 83 ms
76,120 KB
testcase_16 AC 85 ms
76,416 KB
testcase_17 AC 65 ms
71,680 KB
testcase_18 AC 65 ms
71,420 KB
testcase_19 AC 66 ms
71,500 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
ans = 0

for x in range(1,N):
    y = int((N**2 - x**2)**0.5)
    if y**2 + x**2 == N**2:
        ans += 1

print(ans)
0