結果

問題 No.1593 Perfect Distance
ユーザー shinichishinichi
提出日時 2021-07-10 02:47:07
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 92 ms / 2,000 ms
コード長 154 bytes
コンパイル時間 1,225 ms
コンパイル使用メモリ 87,356 KB
実行使用メモリ 76,828 KB
最終ジャッジ日時 2023-09-14 14:51:51
合計ジャッジ時間 4,347 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,192 KB
testcase_01 AC 70 ms
71,356 KB
testcase_02 AC 70 ms
71,684 KB
testcase_03 AC 70 ms
71,352 KB
testcase_04 AC 70 ms
71,832 KB
testcase_05 AC 70 ms
71,788 KB
testcase_06 AC 71 ms
71,344 KB
testcase_07 AC 71 ms
71,468 KB
testcase_08 AC 72 ms
71,356 KB
testcase_09 AC 81 ms
76,368 KB
testcase_10 AC 76 ms
76,496 KB
testcase_11 AC 81 ms
76,612 KB
testcase_12 AC 84 ms
76,604 KB
testcase_13 AC 83 ms
76,692 KB
testcase_14 AC 84 ms
76,828 KB
testcase_15 AC 88 ms
76,668 KB
testcase_16 AC 92 ms
76,236 KB
testcase_17 AC 70 ms
71,532 KB
testcase_18 AC 71 ms
71,540 KB
testcase_19 AC 71 ms
71,600 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())

cnt = 0
for x in range(1, n+1):
    y = n**2-x**2
    if x**2+y == n**2 and 0 < y and (y**0.5).is_integer():
        cnt += 1
print(cnt)
0