[1] Total number of 3-digit numbers which do not contain more than 2 different digits.
[2] Total number of 5-digit numbers which do not contain more than 3 different digits.
$\underline{\bf{My\; Try}}::$ I have formed different cases.
$\bullet$ If all digits are different, like in the form $aaa$, where $a\in \{1,2,3,.....,9\}$
$\bullet$ If all digits are different, like in the form $aba$ , where $a\in \{1,2,3,4,....,9\}$
$\bullet$ If one digit is zero and the other is non-zero, like $a00$ or $aa0$, where $a\in \{1,2,3,4,....,9\}$
But I do not understand how I can get a solution.
Please explain it to me.