Problem 009
Forum rules
As your posts will be visible to the general public you are requested to be thoughtful in not posting anything that might explicitly give away how to solve a particular problem.
This forum is NOT meant to discuss solution methods for a problem.
See also the topics:
Don't post any spoilers
Comments, questions and clarifications about PE problems.
As your posts will be visible to the general public you are requested to be thoughtful in not posting anything that might explicitly give away how to solve a particular problem.
This forum is NOT meant to discuss solution methods for a problem.
In particular don't post any code fragments or results.
Don't start begging others to give partial answers to problems
Don't ask for hints how to solve a problem
Don't start a new topic for a problem if there already exists one
Don't start begging others to give partial answers to problems
Don't ask for hints how to solve a problem
Don't start a new topic for a problem if there already exists one
See also the topics:
Don't post any spoilers
Comments, questions and clarifications about PE problems.
-
ramchand
- Posts: 2
- Joined: Thu Apr 20, 2006 7:21 pm
Problem 009
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
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
- quintic
- Posts: 141
- Joined: Wed Mar 29, 2006 9:33 pm
- Location: Surrey, England
- Contact:
- euler
- Administrator
- Posts: 5095
- Joined: Sun Mar 05, 2006 4:49 pm
- Location: Cheshire, England
- Contact:
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]
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]
Last edited by euler on Fri Apr 21, 2006 10:45 am, edited 2 times in total.
- wwtucker
- Posts: 109
- Joined: Thu Mar 16, 2006 6:45 pm
- Location: Champaign, IL, USA
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.
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.
-
balex4o
- Posts: 2
- Joined: Sun Jan 13, 2008 11:23 am
problem with Problem9
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 
i've been trying to solve Problem 9 and i've found the answer, but it says that my answer is wrong
Code: Select all
[removed by moderator]
Last edited by euler on Sun Jan 13, 2008 12:07 pm, edited 1 time in total.
Reason: Correct answer and a workable program posted
Reason: Correct answer and a workable program posted
- euler
- Administrator
- Posts: 5095
- Joined: Sun Mar 05, 2006 4:49 pm
- Location: Cheshire, England
- Contact:
Re: problem with Problem9
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?
Could you try submitting your answer again and let me know if the problem persists?

impudens simia et macrologus profundus fabulae
-
balex4o
- Posts: 2
- Joined: Sun Jan 13, 2008 11:23 am
- uws8505
- Posts: 58
- Joined: Tue Sep 30, 2008 3:13 pm
- Location: South Korea
Re: What format to enter an answer?
As indicated in the problem, you should enter the product of the three numbers a*b*c.
Math and Programming are complements
-
badperson
- Posts: 4
- Joined: Fri Jan 09, 2009 8:03 pm
Problem 009
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:
"find the product abc" implies a x b x c....
my program so far finds two incorrect solutions:
thanks!
bp
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:
a + b + c implies three numbers whose sum equals 1000,There exists exactly one Pythagorean triplet for which a + b + c = 1000.
Find the product abc
"find the product abc" implies a x b x c....
my program so far finds two incorrect solutions:
Can anyone point me in the right direction?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
thanks!
bp
- daniel.is.fischer
- Posts: 2400
- Joined: Sun Sep 02, 2007 11:15 pm
- Location: Bremen, Germany
Re: problem understanding problem 9
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
You have to find a, b and c with
- a+b+c=1000,
- a2+b2 = c2.
Il faut respecter la montagne -- c'est pourquoi les gypaètes sont là.
-
badperson
- Posts: 4
- Joined: Fri Jan 09, 2009 8:03 pm
Re: problem understanding problem 9
gotcha...
reworked the program, and I thought I had it right, but it's not accepting my answer:
reworked the program, and I thought I had it right, but it's not accepting my answer:
I checked, and that is a pythag triplet... am I doing it wrong?snip
- Tommy137
- Posts: 238
- Joined: Sun Feb 24, 2008 6:02 pm
- Location: Cologne, Germany
- Contact:
Re: problem understanding problem 9
You must enter the product a*b*c.
And please edit your post and delete your solution.
And please edit your post and delete your solution.

-
badperson
- Posts: 4
- Joined: Fri Jan 09, 2009 8:03 pm
Re: problem understanding problem 9
ok, got it, and so sorry about posting the solution, I won't do that in the future.
thanks,
bp
thanks,
bp
- rayfil
- Administrator
- Posts: 1412
- Joined: Sun Mar 26, 2006 5:30 am
- Location: Quebec, Canada
- Contact:
Re: problem understanding problem 9
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.
ProjectEuler Problems
Please use it in the future after making sure you read the first "sticky" post.
When you assume something, you risk being wrong half the time.
- hk
- Administrator
- Posts: 12832
- Joined: Sun Mar 26, 2006 10:34 am
- Location: Haren, Netherlands
Re: problem understanding problem 9
Can someone remember me to merge it with viewtopic.php?f=50&t=1204#p593
(Same problem was treated there)
(Same problem was treated there)

War ruins the life and health of untold numbers of innocent children.
-
DaRabman
- Posts: 1
- Joined: Tue Oct 13, 2009 11:03 pm
Re: Problem 009
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.
Thanks,
Sam.
- elendiastarman
- Posts: 410
- Joined: Sat Dec 22, 2007 8:15 pm
Re: Problem 009
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...
Want some
3.14159265358979323846264338327950288419716939937510
58209749445923078164062862089986280348253421170679...?

3.14159265358979323846264338327950288419716939937510
58209749445923078164062862089986280348253421170679...?

-
craigcussler
- Posts: 4
- Joined: Sun Nov 07, 2010 5:26 pm
Problem 009
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?
but the answer seems to be incorrect! please can you help me to find what's wrong?
Last edited by craigcussler on Thu Nov 11, 2010 12:00 pm, edited 1 time in total.