I can't interpret #1 unless it contains a typo. First it sayshow many four digit numbersand thencomposed of three distinct digits, suggesting that a maximum of one repeat is allowed. Then #2 sayswith repeated digit, which seems to me the exact same question as #1???

Can I assume that the poorly worded #1 means to ask "How many four-digit numberswith distinct digitsare possible..." ???

Anyway, the question #1 is equivalent to solving in where for all , and then taking every possible reordering of these digits as long as the leading digit is nonzero. Question #2 is the same, except removing the criteria that each value must be distinct.

To be honest, I don't see a "clever" way to do this. The brute-force method would be listing outallthe solutions to the equation, eliminating the ones with repeated digits, multiplying by the 4! different orderings, and individually eliminating solutions with a leading zero. Similar approach for #2...