A magic square is an n×n array of distinct positive integers (n > 1) such that the sum of the entries in each row, in each column, and along the two diagonals is the same. For example, a 3×3 magic square with a sum of 2007 is shown below.
672 | 665 | 670 |
667 | 669 | 671 |
668 | 673 | 666 |
This month's problem is to find the smallest size magic square with a sum of 2008. Try to find such a square whose largest entry is as small as possible.