Project Euler.net Answers
Problem 9
Solved on 2/26/2008
A Pythagorean triplet is a set of three natural numbers, a<b<c, for which,
a² + b² = c²
For example, 3² + 4² = 9 + 16 = 25 = 5².
There exists exactly one Pythagorean triplet for which a + b + c = 1000.
Find the product abc.
for($a = 1; $a<500; $a++){
for($b = 500-$a; $b<500; $b++){
$c = 1000-$a-$b;
if( ($c*$c) == ($a*$a+$b*$b)){
$this->a = $a;
$this->b = $b;
$this->c = $c;
$a=500;
$b=500;
}
}
}
$a = 200
$b = 375
$c = 425
$answer = 31,875,000
Feb. 11, 2008
Wells Ideas Inc. launches their redesigned site.
The site is built on a symfony platform and utilizes client information from their project management site.
Wells Ideas Inc. launches their redesigned site.
The site is built on a symfony platform and utilizes client information from their project management site.
"The greatest challenge to any thinker is stating the problem in a way that will allow a solution."
- Bertrand Russell
- Bertrand Russell
Wells Ideas © 2007 | 1-973-769-9108 | info@wellsideas.com
Contact Us | Site Map | Open Source Solutions | Templates | Client Login
Contact Us | Site Map | Open Source Solutions | Templates | Client Login
