Counting how many numbers have repeated digits How many numbers are there in all from $6000$ to $6999$ (both $6000$ and $6999$ included) having at least one of their digits repeated ?
(a) $216$
(b) $356$
(c) $496$
(d) $504$

Look first at the numbers that have all different digits: the first is a $6$, the second can be chosen from $0, \cdots ,9$ except for $6$, so from $9$ numbers, third from $8$ and fourth from $7$, which gives $9 \times 8 \times 7=504$. Subtract that from $6999-6000+1=1000$ and (c) is right.
