Problem 9: Special Pythagorean triplet¶
Link to the problem: https://projecteuler.net/problem=9.
Problem 9
A Pythagorean triplet is a set of three natural numbers, \(a < b < c\), for which \(a^2 + b^2 = c^2\).
For example, \(3^2 + 4^2 = 9 + 16 = 25 = 5^2\).
There exists exactly one Pythagorean triplet for which \(a + b + c = 1000\). Find the product \(abc\).
A simple solution¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | |
[info] [2023-02-24 14:01:42.420] [T-2000] [logging.cpp::62] [main-wire] Answer: 31875000
More details on the Project Euler's website: https://projecteuler.net/overview=009.