exercism/go/pythagorean-triplet/README.md
2016-08-13 18:20:14 -05:00

678 B

Pythagorean Triplet

There exists exactly one Pythagorean triplet for which a + b + c = 1000. Find the product a * b * c.

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.

To run the tests simply run the command go test in the exercise directory.

If the test suite contains benchmarks, you can run these with the -bench flag:

go test -bench .

For more detailed info about the Go track see the help page.

Source

Problem 9 at Project Euler view source