Consider first the numbers 000 to 999 (with leading zeros that won't affect the sum.)
In the hundreds place each digit occurs 100 times.
In the tens place each digit occurs 100 times.
In the ones place each digits occurs 100 times.
So each digit occurs 300 times.
(300*1) + (300*2) + ... + (300*9) = 300(1+2+...+9) = 300*45 = 13500
Consider next the numbers 1000 to 1999
each digit again occurs 300 times except for 1 which occurs an extra 1000 times.
13500+1000=14500
Finally consider 2000 to 2014
There will be 15 leading 2's = 30
five of the numbers will have a 1 in the tens place = 5
in the ones we have 1 to 9 and 1 to 4 = 45 + 10
the total here is 30+5+45+10=90
For a grand total of
13500 + 14500 + 90 =
28090Assuming I made no errors.

Posted by Jer
on 20140603 13:42:42 