How many integers between $1$ and $10^4$ contain exactly one $8$ and one $9$?

275 Views Asked by At

I have this problem: How many integers between $1$ and $10^4$ contain exactly one $8$ and one $9$?, but i dont know if $18, 19, 28, 29...$ serve, else it could be $8$ y $9 = 2$ numbers, help please.

1

There are 1 best solutions below

0
On BEST ANSWER

First, note that $10,000$ does not have this property. Therefore, we only have to consider the numbers $1$ through $9999$, each of which have $4$ digits, including leading zeroes: $$ \big(\quad\big)\big(\quad\big)\big(\quad\big)\big(\quad\big) $$ We can place a $9$ in any of the blank spaces, so there are $4$ ways to do this. Then, once the $9$ has been placed, there are $3$ places where the $8$ can be placed. The last $2$ digits can be anything, except that we can't have any more $8$'s or $9$'s. So there are $8$ different digits that we can use in both cases. Therefore, the number of combinations equals $$ 4 \times 3 \times 8 \times 8 = 768. $$