A DP problem
Posted: Sat Oct 06, 2007 11:26 am
I want to solve problem on the contest and I need your help.
I have number n and I want to find out how many digit 1 - s are in the numbers from 1 to n. how to solve it? n < 10^20.
for exapmle for n = 15 answer is 8
1
10
11
12
13
14
15
there are 8 one from 1 to 15. help please
thanks
I have number n and I want to find out how many digit 1 - s are in the numbers from 1 to n. how to solve it? n < 10^20.
for exapmle for n = 15 answer is 8
1
10
11
12
13
14
15
there are 8 one from 1 to 15. help please
thanks