Lets check what is the sum of digits in between 1-99, leaving zeros

digit : 10+10=20 (1,10,11,...19,21,31,...91) (total value=20)

digit : same 20 (total value=20*2)

hence same with digits

over all total in this above range =

Lets check what is the sum of digits in between 100-199, leaving zeros

Note: units and tens are the same as in 1-99 but only thing 1 digit is repeating from 100-199 (so there are 100 1's extra in this step)

over all total in this above range =

Lets check what is the sum of digits in between 200-299, leaving zeros

Note: units and tens are the same as in 1-99 but only thing 2 digit is repeating from 200-299 (so there are 100 2's extra in this step)

over all total in this above range =

Lets check what is the sum of digits in between 300-399, leaving zeros

Note: units and tens are the same as in 1-99 but only thing 3 digit is repeating from 300-399 (so there are 100 3's extra in this step)

over all total in this above range =

but range given is upto 396 so we have to deduct

hence total value of digits is