Related to Problems 1646 and 2650, but bigger. Technically, all you need to do for this Cody problem is input a 5x5 matrix containing the numbers 1-25. However, your score will be the Kurchan value of the matrix, which is defined as the difference between the maximum and minimum of the products for the rows, columns, diagonals, and anti-diagonals of the matrix.
For example: Magic(5) is
17 24 1 8 15 23 5 7 14 16 4 6 13 20 22 10 12 19 21 3 11 18 25 2 9
The row products are:
The column products are:
The diagonal products are:
The anti-diagonal products are:
The highest value is 6375600, while the lowest is 120. Therefore, the score of this matrix is 6375480. Your Cody score will be the Kurchan score of your matrix.
1102 Solvers
How to find the position of an element in a vector without using the find function
2320 Solvers
116 Solvers
269 Solvers
Getting the indices from a matrice
265 Solvers
Problem Tags