Problem 294

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.
Post Reply
Coda17
Posts: 4
Joined: Fri Sep 24, 2010 3:53 pm

Problem 294

Post by Coda17 »

For problem 294, I tried brute forcing it with a few improvements, but it still takes over 10 minutes just to calculate S(9).

I can't quite figure out how to improve my current implementation. I currently stop summing a numbers digits if the sum is already greater than 23 and my loop in the function S(n) increments by 23 (to ensure it's divisible by 23).

Any ideas to help lead me on the right path?
Image
sivakd
Posts: 217
Joined: Fri Jul 17, 2009 9:37 am
Location: California, USA
Contact:

Re: Problem 294

Post by sivakd »

I was in your boat at first and finally my program solved in milliseconds with the right approach. In my case, solving Problem 290 helped me solve Problem 294. Whatever you learn in 290, you will need that and some more for 294. Hope this helps.
Image
puzzle is a euphemism for lack of clarity
davidlively
Posts: 3
Joined: Sun Aug 19, 2018 9:49 pm

Re: Problem 294

Post by davidlively »

Clarification: *evenly* divisible by 23.

Pedantic, but still.
Post Reply