From 640578455e7df6f93c443c498777e4e14085620c Mon Sep 17 00:00:00 2001 From: t3xhno Date: Tue, 6 Feb 2024 16:09:29 +0100 Subject: [PATCH] Problem8 --- src/problem8.py | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 src/problem8.py diff --git a/src/problem8.py b/src/problem8.py new file mode 100644 index 0000000..d780bee --- /dev/null +++ b/src/problem8.py @@ -0,0 +1,5 @@ +import math + +triplets = [(a, b, c) for a in range(1, 500) for b in range(1, 500) for c in range(1, 500) if math.pow(a, 2) + math.pow(b, 2) == math.pow(c, 2) and a + b + c == 1000] + +print(triplets[0][0] * triplets[0][1] * triplets[0][2])