Question:
When numbers of $1$ to $1000$ are written out in decimal notation. How many digits are $1$?
Attempt:
$$1XX\\
X1X\\
XX1$$
The count of $1$ for the types above are, $${{3}\choose{1}}*9*9$$
$$1000$$
Which is just one $1$.
$$1X\\11\\X1$$
Which is $9+1+9 = 20$.
$$11X\\1X1\\X11$$
Which contains,
$${{3}\choose{1}}*9$$
And finally,
$$1$$
Which is just 1.
Adding them all together,
$${3\choose 1}*81 + 1 + 9 + 1 + 9 + {3\choose 2}*9 + 1 = 291$$
The problem is the answer key demands $301$, if someone could point out what cases am I missing?