How many positive integers less than 1000 have at least one decimal digit equal to 9?
A positive integer less than 1000 has a unique representation as a 3-digit number padded with leading zeros if needed. To avoid a digit of 9, you have 9 choices for each of the 3 digits, but you don't want all zeros, so the excluded set has a count of "9^3"−1=728. Hence the count you want is 999−728=271
Comments
Leave a comment