Excluding the digit ' 0 ', two digits out of the remaining 9 can be selected in 9C2 ways. e.g. 12,23,34 etc.
Now all the 5 digit numbers which can be made which do not contain all digits identical =9C2(25−2)
2 has been deducted from 25 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, =9C2(25−2)+9=1080+9=1089
Now with ' 0 ' always included, we have select the remaining 1 digit in 9C1 ways e.g. 01,02 etc.
[Note that 1st place can be filled only in one way and the remaining digits in two ways] (1)+(2)1080+144=1224 (Ans.)
(Note that 9 has been subtracted as all five digits identical has again been counted)