summaryrefslogtreecommitdiff
path: root/go/pythagorean-triplet/README.md
blob: 861ffc7b3f4b6578a60a5707ab9d329ab0cd9113 (plain)
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
27
28
29
30
31
32
33
34
# 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](http://exercism.io/languages/go).

## Source

Problem 9 at Project Euler [http://projecteuler.net/problem=9](http://projecteuler.net/problem=9)

## Submitting Incomplete Problems
It's possible to submit an incomplete solution so you can see how others have completed the exercise.