Page 1 of 1

Problem 294

Posted: Fri Sep 24, 2010 4:12 pm
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?

Re: Problem 294

Posted: Fri Sep 24, 2010 4:45 pm
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.

Re: Problem 294

Posted: Sun Aug 19, 2018 11:55 pm
by davidlively
Clarification: *evenly* divisible by 23.

Pedantic, but still.