Total number of 4-digit numbers =5×5×5×5 =625
(as each place can be filled by anyone of the numbers 1, 2 , 3,4 and 5)
Numbers in which no two digits are identical =5×4×3×2 (i.e., repetition not allowed) =120 (as 1 st place can be filled in 5 different ways, 2nd place can be filled in 4 different ways and so on)
Number of 4-digits numbers in which atleast 2 digits are identical =625−120 =505