TITLE: How many number with 4 digits, beginning with $1$ and have exactly two identical digits?
QUESTION [7 upvotes]: The numbers $1447$, $1005$, and $1231$ have something in common. Each is a four-digit number beginning with $1$ that has exactly two identical digits. 

How many such numbers are there? 

I have check all the possible cases satisfying the require condition  are $$11xy,\qquad 1x1y,\qquad1xy1\qquad 1xxy,\qquad1xyx,\qquad1yxx.$$
maybe I am missing something. Can anyone help from here?

REPLY [2 votes]: We can find out how many numbers have no repeated digits. There are $9 \cdot 8 \cdot 7 =504$
How many numbers have two different repeated digits. There are three different paces would could stick a 1, and then nine other digits we can use to make a pair in the two remaining spots. So $9 \cdot 3 = 27$
How many have three identical digits? There are $\binom{3}{2}$ places we could stick two more ones, and then 9 other digits. So $3 \cdot 9$. And then nine other numbers of the form $1xxx$. So 36 total.
There is one number with four repeated digits.
So the number of numbers with exactly two repeated digits, is 1000 minus everything we found above, 
$1000 - 504 - 27 - 36 - 1 = 432$