You are viewing a single comment's thread. Return to all comments →
As my code times out, I wonder how can we be sure that the sum s(d) is finite?
For example, if I test the case b=10 and d=1, I get:
f(n,1)=n for n=0
f(n,1)=n for n=1
f(n,1)=n for n=199981
f(n,1)=n for n=199982
f(n,1)=n for n=199983
f(n,1)=n for n=199984
f(n,1)=n for n=199985
f(n,1)=n for n=199986
f(n,1)=n for n=199987
f(n,1)=n for n=199988
f(n,1)=n for n=199989
f(n,1)=n for n=199990
f(n,1)=n for n=200000
f(n,1)=n for n=200001
f(n,1)=n for n=1599981
...
f(n,1)=n for n=35199990
f(n,1)=n for n=35200000
f(n,1)=n for n=35200001
....
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #156: Counting Digits
You are viewing a single comment's thread. Return to all comments →
As my code times out, I wonder how can we be sure that the sum s(d) is finite?
For example, if I test the case b=10 and d=1, I get:
f(n,1)=n for n=0
f(n,1)=n for n=1
f(n,1)=n for n=199981
f(n,1)=n for n=199982
f(n,1)=n for n=199983
f(n,1)=n for n=199984
f(n,1)=n for n=199985
f(n,1)=n for n=199986
f(n,1)=n for n=199987
f(n,1)=n for n=199988
f(n,1)=n for n=199989
f(n,1)=n for n=199990
f(n,1)=n for n=200000
f(n,1)=n for n=200001
f(n,1)=n for n=1599981
...
f(n,1)=n for n=35199990
f(n,1)=n for n=35200000
f(n,1)=n for n=35200001
....