diff --git a/solutions/0009/eular_9.py b/solutions/0009/eular_9.py new file mode 100644 index 0000000..3edb7e2 --- /dev/null +++ b/solutions/0009/eular_9.py @@ -0,0 +1,18 @@ +""" +a^2 + b^2 = c^2 +a + b + c = 1000 +FIND a*b*c +""" + + +def euler_9(): + for a in range(1, 1000): + for b in range(a, 1000): + c = 1000 - a - b + if a**2 + b**2 == c**2: + print(f"Found a={a}, b={b}, c={c}") + return a * b * c + + +if __name__ == "__main__": + print(euler_9())