Question 27
Daniel wrote all the positive integers from $1$ to $n$ inclusive on a piece of paper. After careful observation, he realized that the sum of all the digits that he wrote was exactly $10,\!000$. Find $n$.
Math Olympiad Vault · MathNet 2009-part-05 — 172 problems (EN–VI)