solutions 7 8 9
This commit is contained in:
15
problem9.py
Normal file
15
problem9.py
Normal file
@ -0,0 +1,15 @@
|
||||
from math import sqrt
|
||||
|
||||
def main():
|
||||
a = 1
|
||||
b = 1
|
||||
c = 1
|
||||
|
||||
for c in range(1000):
|
||||
for b in range(c):
|
||||
for a in range(b):
|
||||
if a + b + c == 1000:
|
||||
if sqrt(a**2 + b**2) == c:
|
||||
print(str(a) + ' ' + str(b) + ' ' + str(c))
|
||||
print(a*b*c)
|
||||
return
|
Reference in New Issue
Block a user