Page 1 of 4
Problem 009
Posted: Thu Apr 20, 2006 8:59 pm
by ramchand
Regarding Problem 9 of the original Mathschallenge problems,
There exists exactly one Pythagorean triplet for which a + b + c = 1000
I fail to see the unique solution and doubt whether it exists.
Can anyone answer this query?
Thanks
Posted: Thu Apr 20, 2006 9:26 pm
by quintic
I don't want to give anything away, but I can say there is definitely a solution! And it is unique.
Posted: Thu Apr 20, 2006 9:57 pm
by euler
Hi ramchand,
I've moved this to the "Programming Problems" section.
Like quintic said we are not able to give too much away, but I hope you've realised that the equation a + b + c = 1000 is not given in isolation; that equation certainly does not have unique solutions. But the problem states that a, b, and c are a Pythagorean triplet, which means that it is also true that a2 + b2 = c2.
[edit]Edited to remove hint - after all we don't want to take away the fun in solving the problem![/edit]
Posted: Fri Apr 21, 2006 8:28 am
by wwtucker
Here's a way of explaning the problem without giving away and hints toward the solution.
We want positive integers: a,b,c such that a+b+c=1000 and a2+b2=c2. It is clear by inspection that there are only a finite number of possibilities - the problem statement claims that there is only one set of a,b,c that works and (essentially) asks you to find it.
Problem 9
Posted: Sun Apr 23, 2006 9:19 pm
by ramchand
Thanks.
Having the assurance that the solution exists, I solved it soon enough.
problem with Problem9
Posted: Sun Jan 13, 2008 11:35 am
by balex4o
Hallo,
i've been trying to solve Problem 9 and i've found the answer, but it says that my answer is wrong

I've been looking in Internet for the answer and i've found the same answer [removed by moderator]. Is there a problem with the website, oder i think wrong
Re: problem with Problem9
Posted: Sun Jan 13, 2008 12:09 pm
by euler
Hi balex4o. I had to edit your post because you posted the correct answer and a program that would give the right answer.
Could you try submitting your answer again and let me know if the problem persists?
Re: problem with Problem9
Posted: Sun Jan 13, 2008 1:26 pm
by balex4o
Well, now is everything all right ! :=)
Problem 9
Posted: Mon Nov 10, 2008 6:57 am
by HazardTW
I was trying problem #9 but do not know how to enter my answer in the text input box, ie. should it be a=###, b=###, c=### ?
... or maybe ###+###+###=1000 ?
Re: What format to enter an answer?
Posted: Mon Nov 10, 2008 7:19 am
by uws8505
As indicated in the problem, you should enter the product of the three numbers a*b*c.
Problem 009
Posted: Sat Jan 24, 2009 8:26 pm
by badperson
Hi,
In the pythagorean triplet problem, the example given for a^2 + b^2 = c^2
is 3^2(9) + 4^2(16) = 5^2(25)
so the answer is 25, which has a square root of 5.
the problem is supposed to end up with an answer of 1000, but 1000 doesn't have a perfect square (I mean a square root that is a whole number, maybe I'm using the wrong terminology there)
also, in the problem description, it says this:
There exists exactly one Pythagorean triplet for which a + b + c = 1000.
Find the product abc
a + b + c implies three numbers whose sum equals 1000,
"find the product abc" implies a x b x c....
my program so far finds two incorrect solutions:
100(a) + 324(b) + 576(c) = 1000
total2 is: 424
10 x 10 = 100
10 x 10 = 100
18 x 18 = 324
18 x 18 = 324
24 x 24 = 576
24 x 24 = 576
are the roots 10, 18 and 24 a pythag triangle? false
36(a) + 64(b) + 900(c) = 1000
total2 is: 100
6 x 6 = 36
6 x 6 = 36
8 x 8 = 64
8 x 8 = 64
30 x 30 = 900
30 x 30 = 900
are the roots 6, 8 and 30 a pythag triangle? false
Can anyone point me in the right direction?
thanks!
bp
Re: problem understanding problem 9
Posted: Sat Jan 24, 2009 8:35 pm
by daniel.is.fischer
It's not the squares that should sum up to 1000, but the lengths a, b and c themselves.
You have to find a, b and c with
Re: problem understanding problem 9
Posted: Sat Jan 24, 2009 9:28 pm
by badperson
gotcha...
reworked the program, and I thought I had it right, but it's not accepting my answer:
snip
I checked, and that is a pythag triplet... am I doing it wrong?
Re: problem understanding problem 9
Posted: Sat Jan 24, 2009 9:48 pm
by Tommy137
You must enter the product a*b*c.
And please edit your post and delete your solution.
Re: problem understanding problem 9
Posted: Sat Jan 24, 2009 10:10 pm
by badperson
ok, got it, and so sorry about posting the solution, I won't do that in the future.
thanks,
bp
Re: problem understanding problem 9
Posted: Sun Jan 25, 2009 3:06 am
by rayfil
And there is a special forum for those kinds of questions relating to specific Project Euler problems. Its title is quite descriptive.
ProjectEuler Problems
Please use it in the future after making sure you read the first "sticky" post.
Re: problem understanding problem 9
Posted: Sun Jan 25, 2009 9:57 am
by hk
Can someone remember me to merge it with
viewtopic.php?f=50&t=1204#p593
(Same problem was treated there)
Re: Problem 009
Posted: Tue Oct 13, 2009 11:12 pm
by DaRabman
Hi there, I'm fairly sure that my answer to
Problem 9 (
View Problem) is correct, and wanted to clear up the policy on form. My answer has a decimal place, should it be rounded to an integer, and if not, how many significant figures?
Thanks,
Sam.
Re: Problem 009
Posted: Tue Oct 13, 2009 11:25 pm
by elendiastarman
a, b, and c should all be integers and as such the product should be an integer. Methinks you're allowing a decimal into one of the three...
Problem 009
Posted: Thu Nov 11, 2010 11:47 am
by craigcussler
hello, I'm trying to solve the 9th problem, so i created asimple python code:
but the answer seems to be incorrect! please can you help me to find what's wrong?