Problema Solution
Find the sum of all positive six-digit integers whose digits are a permutation of the digits in the number 123456 without listing them all.
Answer provided by our tutors
The number of permutation is 6! = 720.
Since there are 6 different digits and each digit appears equal number of times in each digit position, we have:
720/6 = 120 times number 1 appears on the first position, also 120 times number 2 appears on the first position, and so on.
So, the sum of all the six-digit integers is:
120*10^5*(1 + 2 + 3 + 4 + 5 + 6) + ... + 120*10*(1 + 2 + ... + 6) + 120*(1 + 2 + ... + 6) =
= (1 + 2 + 3 + 4 + 5 + 6)*120*(10^5 + 10^4 + ... + 10 + 1) =
= 21*120*111111 = 279,999,720