Two cases are involved here:
1. 3 digit numbers with each digit appearing only once.
2. 3 digit numbers with 1 digit appearing twice.
1. 3 digit numbers with each digit appearing only once.
__ __ __
First sport can be filled with 9 digits. Second spot can be filled by all but the digit used in the first spot. Third digit can be filled by all but the 2 digits already used in the first and second spots.
9*8*7 = 504 different numbers.
2. 3 digit numbers with 1 digit appearing twice.
Say we fill the first spot with any one of the 9 digits. Now, if this digit were to reappear in the second or third spot, we shall only have 1 way of filling it.That leaves us with the only other remaining spot, which can be filled with rest of the 8 remaining digits.
9*1*8 or 9*8*1 = 72 ways each
Number of arrangements of 2 spots for the repeating digits out of 3 total spots = 3!/2!
Therefore, total number of ways for case 2 is 72*3 = 216
Hence with case 1 and case 2 taken together, we have a total of 504+216 = 720 ways.