Q. How many 5 digit numbers are there which contains not more than two different digits ?

 188  125 Permutations and Combinations Report Error

Answer: 1224

Solution:

Excluding the digit ' 0 ', two digits out of the remaining 9 can be selected in ways. e.g. etc.
image
Now all the 5 digit numbers which can be made which do not contain all digits identical
2 has been deducted from to exclude numbers formed by all five alike digits otherwise their will be repeatition when we take 1 and 2 then 11111 will appear & when we select 1 and 3 then again 11111 will appear.
( like 1111111
But we have 9 such numbers containing all alike digits. Hence total 5 digit numbers none of them containing the digit ' 0 ' having not more than two alike digits,

Now with ' 0 ' always included, we have select the remaining 1 digit in ways e.g. 01,02 etc.
image
[Note that 1st place can be filled only in one way and the remaining digits in two ways]
(Ans.)
(Note that 9 has been subtracted as all five digits identical has again been counted)