Problem 315

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


See also the topics:
Don't post any spoilers
Comments, questions and clarifications about PE problems.
mdean
Posts: 165
Joined: Tue Aug 02, 2011 2:05 am

Re: Problem 315

Post by mdean »

jake223 wrote:I get 37->10 is 2+3=5 and 10->1 is 2; (2+5)*2=14
I get 17->8 is 3; 3*2=6.

Both are correct. Thanks anyway.
No, both are incorrect. For example from 17 to 8, four segments remain on, giving a savings of 8, not 6. 37 is similarly wrong. It should be 16.
Image

User avatar
jake223
Posts: 57
Joined: Mon Apr 25, 2011 5:15 am
Location: USA
Contact:

Re: Problem 315

Post by jake223 »

Sorry about my earlier post. You indeed are correct. I misinterpreted "overhang" because I have never seen a seven which looked like:

Code: Select all

 _ 
| |
  |
before. Thanks for your help.
Image

livne
Posts: 2
Joined: Sun Sep 01, 2013 10:21 pm

Re: Problem 315

Post by livne »

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

livne
Posts: 2
Joined: Sun Sep 01, 2013 10:21 pm

Re: Problem 315

Post by livne »

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.

User avatar
nicolas.patrois
Posts: 118
Joined: Fri Jul 26, 2013 4:54 pm
Contact:

Re: Problem 315

Post by nicolas.patrois »

There is a small typo: "tansition".
Image

User avatar
hk
Administrator
Posts: 10811
Joined: Sun Mar 26, 2006 10:34 am
Location: Haren, Netherlands

Re: Problem 315

Post by hk »

Thanks, fixed.
Image

jdorje
Posts: 2
Joined: Fri May 06, 2016 2:48 am

Re: Problem 315

Post by jdorje »

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.

User avatar
hk
Administrator
Posts: 10811
Joined: Sun Mar 26, 2006 10:34 am
Location: Haren, Netherlands

Re: Problem 315

Post by hk »

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.
Image

hamsterofdeath
Posts: 8
Joined: Fri Apr 27, 2018 7:17 pm

Re: Problem 315

Post by hamsterofdeath »

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.

User avatar
sjhillier
Administrator
Posts: 546
Joined: Sun Aug 17, 2014 4:59 pm
Location: Birmingham, UK
Contact:

Re: Problem 315

Post by sjhillier »

hamsterofdeath wrote:
Wed May 06, 2020 10:58 pm
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.

Post Reply