✔ 最佳答案
First digit 6 choices : all except 0
Second digit 6 choices : all except first digit chosen
Third digit 5 choices : all except first 2 digits chosen
Last digit 4 choices : all except first 3 digits chosen
Together (6)(6)(5)(4) = 720
Consider last digit first:
Case (I) last digit is zero
Last digit only 1 choice : 0
First digit 6 choices : all except zero
Second digit 5 choices : all except 0 and first digit chosen
Third digit 4 choices : all except the 3 digits chosen
Together (1)(6)(5)(4) = 120
Case (I) last digit is non-zero
Last digit only 3 choices : 2, 6, 8
First digit 5 choices : all except zero and last digit chosen
Second digit 5 choices : all except first and last digit chosen
Third digit 4 choices : all except the 3 digits chosen
Together (3)(5)(5)(4) = 300
Case (I) + Case (II) = 420
Consider the case when zero is allowed in the first digit, there will be (7)(6)(5)(4) ways = 840 to form the numbers. Since there are 7 numbers to choose from, each number will appear 840/7 = 120 times in each of the digit positions.
Now since zero is not allowed in the first digit, 120 of the 0xxx cases were removed. Therefore each of the 6 numbers will appear 120/6 = 20 times less in the 2nd, 3rd and last digits. The number of occurrences in the first digit remains the same as only 0 is disallowed. So the total is calculated as:
120(1 + 2 + 5 + 6 + 7 + 8)(1000) + 100(1 + 2 + 5 + 6 + 7 + 8)(100) + 100((1 + 2 + 5 + 6 + 7 + 8)(10) + 100(1 + 2 + 5 + 6 + 7 + 8)
= 120000(29) + 10000(29) + 1000(29) + 100(29)
= 3801900