Text
How many integers from to contain at least one digit ?
Solution
We count by complement, representing each integer from to as a -digit string (with possible leading zeros, from to ): these are strings. The strings that do not contain any use only digits in each position: . So the strings with at least one number . Since the excluded string (which corresponds to no integer between and ) contains no , it does not affect this count: