結果

問題 No.1593 Perfect Distance
ユーザー lam6er
提出日時 2025-03-20 20:18:07
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 94 ms / 2,000 ms
コード長 170 bytes
コンパイル時間 381 ms
コンパイル使用メモリ 82,548 KB
実行使用メモリ 76,716 KB
最終ジャッジ日時 2025-03-20 20:18:56
合計ジャッジ時間 2,039 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 17
権限があれば一括ダウンロードができます

ソースコード

diff #

import math

n = int(input())
ans = 0
for x in range(1, n):
    y_sq = n * n - x * x
    y = math.isqrt(y_sq)
    if y * y == y_sq and y >= 1:
        ans += 1
print(ans)
0