1

How many numbers in the range from $0$ to $10^9 − 1$ contain the digit $3$?
So pretty much how many numbers from the between $0$ and $999,999,999$ contain the digit "$3$" ?

Please give an arithmetic expression if possible. Help would be much appreciated.

BlackAdder
  • 4,029
kiasy
  • 127
  • Note that it is useful to think of "small" numbers as being left-padded with $0$'s. The problem does not change if we think of, for example, $3440$, as $000,003,440$. – André Nicolas Dec 19 '13 at 02:53
  • @AndréNicolas that doesn't really help. I still have no idea :( – kiasy Dec 19 '13 at 02:56
  • The answer by user4140 is very useful. It shows you how to count the numbers that don't have a $3$. Then by subtraction from $10^9$ you get a count of the numbers that do have (at least one) $3$. – André Nicolas Dec 19 '13 at 02:58

1 Answers1

4

How many numbers don't? notice if it can't have $3$ we have $9$ options for each digit, so there are $9^{9}$ numbers made of those digits, also they are all non-negative and less than $10^9$.

Asinomás
  • 105,651