Counting nines to 1000

How many times does the digit 99 appear when writing out all the integers from 11 to 10001000? (For instance, 919919 contributes two 99s.)

Show hints (2)+
  1. Pad to 33 digits (000000999999): each digit appears 100100 times in each of the 33 positions.
  2. So 99 appears 3×1003\times100; 10001000 adds none.

Answer

Reveal answer →

300

Want the full step-by-step worked solution? It's part of Premium - along with a worked solution for every question in the bank.

Asked at: Jane Street, Citadel

Related questions