Quoto

Learn / Library / Brainteasers

Total of all digits written

BrainteasersEasy

The integers from to are written out in ordinary decimal notation with no leading zeros, and every digit written is added to a running total. What is the final total?

Checking an answer needs JavaScript. The hint and the solution open without it.

A whole number, a decimal, a fraction like 3/8 or a percent.

Hint

Split the range into blocks where the digit sums are easy: single digits, -digit numbers, then the hundreds.

Solution
  1. The numbers to contribute , and the numbers to contribute , because each tens digit from to appears times and each units digit appears times.
  2. The numbers to contribute from the hundreds digit plus from the last digits, which is .
  3. The numbers to contribute from the hundreds digit, from the tens digits of to , from their units digits, and from the tens digit of , which is in all.
  4. Adding the blocks gives .

Answer: