結果

問題 No.1593 Perfect Distance
ユーザー 👑 rin204rin204
提出日時 2021-07-09 23:49:03
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 88 ms / 2,000 ms
コード長 131 bytes
コンパイル時間 273 ms
コンパイル使用メモリ 87,112 KB
実行使用メモリ 76,660 KB
最終ジャッジ日時 2023-09-14 11:15:19
合計ジャッジ時間 2,950 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
71,268 KB
testcase_01 AC 71 ms
71,824 KB
testcase_02 AC 70 ms
71,492 KB
testcase_03 AC 71 ms
71,500 KB
testcase_04 AC 69 ms
71,736 KB
testcase_05 AC 69 ms
71,476 KB
testcase_06 AC 69 ms
71,656 KB
testcase_07 AC 70 ms
71,592 KB
testcase_08 AC 71 ms
71,696 KB
testcase_09 AC 77 ms
76,368 KB
testcase_10 AC 75 ms
76,260 KB
testcase_11 AC 81 ms
76,660 KB
testcase_12 AC 83 ms
76,648 KB
testcase_13 AC 85 ms
76,632 KB
testcase_14 AC 85 ms
76,352 KB
testcase_15 AC 88 ms
76,376 KB
testcase_16 AC 88 ms
76,484 KB
testcase_17 AC 69 ms
71,616 KB
testcase_18 AC 71 ms
71,456 KB
testcase_19 AC 70 ms
71,456 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
ans = 0
for i in range(1, n):
    jj = n * n - i * i
    if jj == int(jj ** 0.5) ** 2:
        ans += 1
print(ans)
0