Project Euler Problem 9 Solution

Question

A Pythagorean triplet is a set of three natural numbers, a<b<ca \lt b \lt c, for which

a2+b2=c2a^2 + b^2 = c^2

For example, 32+42=9+16=25=523^2 + 4^2 = 9 + 16 = 25 = 5^2.

There exists exactly one Pythagorean triplet for which a+b+c=1000a + b + c = 1000. Find the product a×b×ca \times b \times c.

Clojure

Go

Haskell

JavaScript

Ruby

Rust