Question : Four-figure numbers are to be formed from the digits 4,5,6,7,8,9 .How many different four-figure numbers can be formed if there is at least one repeated digit, but no digit appears more than twice in the number.

trying a lot but not getting the answer.plz help