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