solutions 7 8 9

This commit is contained in:
JellyWX
2017-06-21 21:20:47 +01:00
parent 1231e9562e
commit 42c8b5f771
4 changed files with 55 additions and 0 deletions

15
problem9.py Normal file
View 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