# Sum of Scores for Permutations

**Discrete Mathematics**Level 4

Consider a random permutation of the values 1, 2, 3, 4, 5, and 6, for example (1, 2, 3, 4, 6, 5). Let a distance of a number be defined as the number of places between the number's position from the position indexed by the number. For example, the distance of 6 in (1, 2, 3, 4, 6, 5) is 1 because 6 is in the 5th position, which is 1 place away from the 6th position. The score of a permutation is the total distance of all numbers in the permutation. In the example (1, 2, 3, 4, 6, 5), the score would be 2 = 1 + 1 for 5 and 6. Find the total score across all permutations of the values 1, 2, 3, 4, 5, and 6.