(d)
When repetition is allowed then, number of four digits numbers that can be formed using 1, 2, 3, 4, 5$= 5^{4}$
and when repetition of digits is not allowed, then number of 4 digits numbers which can be formed is $\ ^{5}P_{4} = 5!$
$\therefore$ The number of ways in which at least one digit is repeated$= 5^{4} - 5!$