I'm not 100% sure, but I think I found an error in the description to problem 76:
According to the description, there are 6 different ways to represent 5 as a sum. Assuming this is true, this means that the "5" itself is not included, or, in other words, a sum of a single term should not be considered. Otherwise there would be 7 different ways to represent 5...
But in the accepted solution, the sum containing only the single term "100" seems to be included in the count...
Problem 076
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.
-
Robert_Gerbicz
- Posts: 26
- Joined: Sat Oct 13, 2007 2:44 pm
-
flOvermind
- Posts: 3
- Joined: Sun May 25, 2008 10:52 pm
Re: Error in Problem 76
Could you please clarify?
I mean, the question in itself is definitely ambigous. Is 5 = 5 considered a valid sum or not? Unlike in some other problems, that's not explicitly stated here.
If I look at the example, this leads to the conclusion that 5 = 5 is not considered a valid sum, otherwise the correct answer would be 7. So I wrote a program that counts only sums with at least two terms. This program gives an answer that is one less than the expected answer.
Then I wrote a program that does count sums with only one term, and this program gives the correct answer. The program is very simple, and I tested it with various different small examples, so I'm pretty sure it's correct...
If I run my "correct" program (the one that gives the answer that is correct according to your website) with the input 5, the answer is 7, not 6!
Could you write a program that outputs the correct solution to both problems? I highly doubt it...
I mean, the question in itself is definitely ambigous. Is 5 = 5 considered a valid sum or not? Unlike in some other problems, that's not explicitly stated here.
If I look at the example, this leads to the conclusion that 5 = 5 is not considered a valid sum, otherwise the correct answer would be 7. So I wrote a program that counts only sums with at least two terms. This program gives an answer that is one less than the expected answer.
Then I wrote a program that does count sums with only one term, and this program gives the correct answer. The program is very simple, and I tested it with various different small examples, so I'm pretty sure it's correct...
If I run my "correct" program (the one that gives the answer that is correct according to your website) with the input 5, the answer is 7, not 6!
Could you write a program that outputs the correct solution to both problems? I highly doubt it...
- daniel.is.fischer
- Posts: 2400
- Joined: Sun Sep 02, 2007 11:15 pm
- Location: Bremen, Germany
Re: Error in Problem 76
The problem asks "How many different ways can one hundred be written as a sum of at least two positive integers?", so 100 = 100 is not to be counted. Obviously, since the solution to both programmes differs by one, a single output can't be correct for both. I would be interested in seeing your programmes.
Il faut respecter la montagne -- c'est pourquoi les gypaètes sont là.
-
flOvermind
- Posts: 3
- Joined: Sun May 25, 2008 10:52 pm
Re: Error in Problem 76
At the moment I don't have access to my source code. Once I get home (probably on Friday), I will send you a PM with my source (I assume I shouldn't post the solution to this public forum
).
Btw. the solution differs by exactly one because the difference between the programs is a subtraction by 1
Btw. the solution differs by exactly one because the difference between the programs is a subtraction by 1
-
ravish.hacker
- Posts: 3
- Joined: Fri Sep 11, 2009 3:57 pm
Problem76
[Please note that if you haven't solved the this problem yet please don't read further.]
Well, It seems like the answer is readily available for this question on Wikipedia. I request Project Euler team to please change the question to values other then 100 (may be 105 or something).
Well, It seems like the answer is readily available for this question on Wikipedia. I request Project Euler team to please change the question to values other then 100 (may be 105 or something).
- hk
- Administrator
- Posts: 12832
- Joined: Sun Mar 26, 2006 10:34 am
- Location: Haren, Netherlands
Re: Problem76
This wouldn't help very much as OEIS has b-files reaching far enough to cover every possible limit.
One can do two things: type in the answer one finds somewhere, or try to think up how it can be done in reasonable time.
This is of course the idea of the problem.
One can do two things: type in the answer one finds somewhere, or try to think up how it can be done in reasonable time.
This is of course the idea of the problem.

War ruins the life and health of untold numbers of innocent children.