test
This commit is contained in:
14
task_28.py
Normal file
14
task_28.py
Normal file
@@ -0,0 +1,14 @@
|
||||
k = int(input("Введите значение k: "))
|
||||
|
||||
k_squared = k * k
|
||||
found = False
|
||||
|
||||
for x in range(1, 31):
|
||||
for y in range(1, 31):
|
||||
for z in range(1, 31):
|
||||
if x * x + y * y + z * z == k_squared:
|
||||
print(f"x={x}, y={y}, z={z}")
|
||||
found = True
|
||||
|
||||
if not found:
|
||||
print("Решений не найдено")
|
||||
Reference in New Issue
Block a user