862 B
862 B
Pythagorean Triplet
Welcome to Pythagorean Triplet on Exercism's Go Track.
If you need help running the tests or submitting your code, check out HELP.md
.
Instructions
A Pythagorean triplet is a set of three natural numbers, {a, b, c}, for which,
a² + b² = c²
and such that,
a < b < c
For example,
3² + 4² = 9 + 16 = 25 = 5².
Given an input integer N, find all Pythagorean triplets for which a + b + c = N
.
For example, with N = 1000, there is exactly one Pythagorean triplet for which a + b + c = 1000
: {200, 375, 425}
.
Source
Created by
- @soniakeys
Contributed to by
- @alebaffa
- @bitfield
- @ekingery
- @ferhatelmas
- @hilary
- @kytrinyx
- @leenipper
- @petertseng
- @robphoenix
- @sebito91
- @tleen
Based on
Problem 9 at Project Euler - http://projecteuler.net/problem=9