Our server costs ~$56 per month to run. Please consider donating or becoming a Patron to help keep the site running. Help us gain new members by following us on Twitter and liking our page on Facebook!
Current time: April 28, 2024, 8:06 pm

Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pythagorean Triplet
#1
Pythagorean Triplet
Taken from Project Euler (an epic site btw), this is mainly for the programmers out there, although if you can solve it using a pen and paper, good show.

A Pythagorean triplet is a set of three natural numbers, a < b < c, for which, a2 + b2 = c2

For example, 32 + 42 = 9 + 16 = 25 = 52.

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

I wrote a quick computer program (in Java) that solves the problem in less than a second 124ms (I just put it through a profiler).
Reply



Messages In This Thread
Pythagorean Triplet - by Tiberius - April 7, 2010 at 10:10 pm
RE: Pythagorean Triplet - by AtheistPhil - April 9, 2010 at 9:04 pm
RE: Pythagorean Triplet - by Pippy - April 10, 2010 at 7:09 am

Possibly Related Threads...
Thread Author Replies Views Last Post
  Proof by Rearrangement of the Pythagorean Theorem FlatAssembler 10 1639 November 22, 2018 at 7:13 pm
Last Post: Reltzik



Users browsing this thread: 1 Guest(s)