How can we know that among all numbers with $3$ or fewer digits (i.e. a number $n<1000$), each digit (from $0$ to $9$) appears exactly $300$ times? I'm trying to convince myself, but I can't seem to find the right way to do so.
(If you're wondering about the context, here's the problem to which the statement above was a pretty integral part of solution:
Find the sum of the digits of all numbers in the sequence $1,2,3,4,\ldots,100$.)