mirror of
https://github.com/Alexander-D-Karpov/scripts.git
synced 2024-11-24 20:43:43 +03:00
17 lines
346 B
Python
17 lines
346 B
Python
def check_n(n):
|
|
r = []
|
|
for x in range(1, int(n**0.5) + 1):
|
|
for y in range(x, int(n**0.5) + 1):
|
|
if x**2 + y**2 == n:
|
|
r.append((x, y))
|
|
if len(r) > 1:
|
|
return []
|
|
|
|
return r
|
|
|
|
|
|
for x in range(164361, 164424):
|
|
n = check_n(x)
|
|
if n:
|
|
print(n[0], x)
|