Moved 6 to 11 from ipython to python.
This commit is contained in:
10
python/e009.py
Normal file
10
python/e009.py
Normal file
@@ -0,0 +1,10 @@
|
||||
def euler_009():
|
||||
for a in range(1, 251):
|
||||
for b in range(a + 1, 501):
|
||||
c = 1000 - a - b
|
||||
if a * a + b * b == c * c:
|
||||
return a * b * c
|
||||
|
||||
|
||||
assert(euler_009() == 31875000)
|
||||
print("e009.py: {}".format(euler_009()))
|
||||
Reference in New Issue
Block a user