CPCRC1C  Sum of Digits
Majid is a 3rdgrade elementary student and quite well in mathematics. Once, Majid's teacher asked him to calculate the sum of numbers 1 through n.
Majid quickly answered, and his teacher made him another challenge. He asked Majid to calculate the sum of the digits of numbers 1 through n.
Majid did finally find the solution. Now it is your turn, can you find a solution?
Input
Two spaceseparated integers 0 <= a <= b <= 10^{9}.
Program terminates if a and b are 1.
Output
The sum of the digits of numbers a through b.
Example
Input:
1 10
100 777
1 1
Output:
46
8655
hide comments
distructo:
20210104 13:27:02
Please fill your dp with 1 two times.. I literally wasted my 4 hours because of that :( 

abhishen99:
20201224 13:10:13
easy peasy ...


coder_619:
20200915 13:12:55
3Dp Problem With State As: (pos,sum,tight) 

ankit_code2799:
20200528 20:42:08
AC in one go! 

scolar_fuad:
20191122 16:39:02
Basic Digit dp problem


bhagirathi08:
20190908 05:59:12
Well got my first digit dp problem accepted, Thanks for the question. DIGIT DP works like a bliss! 

mithun_rahman:
20190711 18:34:08
it can be tagged as combinatorics 

cicipi:
20180619 15:27:14
just same as this one .....here b<=1e15


codefield:
20180518 11:38:45
can be solved without digit dp Last edit: 20180518 11:48:58 

r19:
20180226 20:59:51
A comment was left 
Added by:  Tii 
Date:  20101025 
Time limit:  1s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 
Resource:  http://cs.ikiu.ac.ir/cms/icpc/training/7contest/86contest1 