The sum of all the digits used to write the whole numbers 10 through 13 is $1 + 0 + 1 + 1 + 1 + 2 + 1 + 3 = 10$. what is the sum of all the digits used to write the whole numbers 1 through 110, inclusive?

Respuesta :

First get the sum of digits 0 through 9: 0+1+2+...+9=45. Call this sum S for short.

Then notice that the sum of the digits for 10 through 19 is the sum S + 10.

Then notice that the sum of digits 20 through 29 is S + 20, and do so until you hit 100. 100 through 109 is the same as 10 though 19 which you know is S + 10, and finally add the sum of digits of 110, i.e., 2.

Total = S + (S + 10) + (S + 20) + ... + (S + 90) + (S + 10) +2 =

= 11 * S + 10 * (S + 1) + 2 = 11 * 45 + 10 * 46 + 2 = 957