TITLE: Counting the number of numbers
QUESTION [5 upvotes]: Problem In each of the following $6$ digit numbers: $333333, 201102, 123123$; every digit appears at least twice. Find the number of such $6$-digit natural numbers.


I have done this problem using case work.

Those numbers containing exactly 3 distinct digits,
those numbers containing exactly 2 distinct digits, and similarly
those numbers containing only 1 digit

Also Case 1 and 2 involved two sub-cases each for numbers with/without 0.
But I want to know if there is a less bashy solution. 
Please help.

REPLY [2 votes]: I can't go straight to the answer, but yes, I can reduce cases and simplify computations.
The idea is to always keep $A$ at start, and let $B$ and $C$ assume any value including $0$.
So the 1st multiplier will always be $9$, and we only need to choose $B,C$ and permute the 5 digits.
$A|AAAAA: 9$
$A|AAABB: 9\binom91\binom{5}{3,2}$
$A|AABBB: 9\binom91\binom{5}{2,3}$
$A|ABBBB: 9\binom91\binom{5}{1,4}$
$A|ABBCC: 9\binom92\binom{5}{1,2,2}$
Do check for typos in the formulations !