A place to air possible concerns or difficulties in understanding ProjectEuler problems. This forum is not meant to publish solutions. This forum is NOT meant to discuss solution methods or giving hints how a problem can be solved.

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.

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

Hello,
I am getting a wrong answer for some reason. Could someone please verify which of the following answers is correct? Thank you so much.

sam-max diff for primes between 10 and 20: 20
sam-max diff for primes between 20 and 40: 24
sam-max diff for primes between 40 and 80: 90
sam-max diff for primes between 80 and 160: 140
sam-max diff for primes between 160 and 320: 316
sam-max diff for primes between 320 and 640: 622
sam-max diff for primes between 640 and 1280: 1182

Never mind. I had a boundary case bug. The above numbers were wrong; I will let others post the correct numbers for those ranges if they feel it is necessary to do so without compromising the problem.

This is easily the most unclear problem I've solved to date. Digital root isn't defined (I did not know this term and thus did not realize that was the key phrase), and therefore it's not clear that for each number fed in the sequence of roots is displayed, or that the clock is reset in between each sequence. This is probably why almost nobody has solved this problem despite it being among the easiest.

jdorje wrote:This is easily the most unclear problem I've solved to date. Digital root isn't defined (I did not know this term and thus did not realize that was the key phrase), and therefore it's not clear that for each number fed in the sequence of roots is displayed, or that the clock is reset in between each sequence.

Does it occur to you that "digital root" can be easily found on the web?

This is probably why almost nobody has solved this problem despite it being among the easiest.

The problem has been solved by 1941 people.
That's quite a lot more than almost nobody.

i am getting correct numbers for the example in the problem description and for 1999993, but my end result is wrong.
i double checked my "which bar"-settings and they are ok.
can someone give me some example numbers so i can find my bug?

i also tried a few numbers and confirmed the result manually. everything seems to be correct.

i also tried a few numbers and confirmed the result manually. everything seems to be correct.

We prefer not to give out more test cases. Given that it sounds as if your individual calculations are correct, perhaps it's something different - eg the prime number algorithm.