Originally Posted by

**DivideBy0** Ah, this is a very nice problem, and there is an elegant solution.

For each permutation, there is another one that can be added to it so that the sum equals 66666.

Examples: For 12345, there exists exactly one other permutation that sums with it to 66666, and that is 54321.

For 13245 it is 53421, for 34251 it is 32415.

I don't have a formal proof for this, but after some consideration it does seem very intuitively correct.

Therefore, since we have sixty pairs of these permutations, the sum is 66666*60 = 399960.