The sum of the digits used to write the whole numbers 1 through 100 (inclusive):
First, the units digits: 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 = 45
These units digits will be repeated for each of the sets: 10 ... 19, 20 ... 29, 30 ... 39, ..., 90 ... 99
So the total of the units digits is 10 x 45 = 450
Now, the tens digits:
-- in writing the numbers from 10 through 19 the "1" will be written 10 times: 10 x 1 = 10
-- in writing the numbers from 20 through 29 the "2" will be written 10 times: 10 x 2 = 20
-- in writing the numbers from 30 through 39 the "3" will be written 10 times: 10 x 3 = 30
So, we also have 10 x 4 = 40, 10 x 5 = 50, 10 x 6 = 60, 10 x 7 = 70, 10 x 8 = 80, and 10 x 9 = 90
Summing the tens digits: 450.
Total for both the ones digits and the tens digits = 900
Plus the "1" in 100: 901.