把1至25这25个数添入5x5的格子中,使每横行,竖行,对角上五数之和都相等.

问题描述:

把1至25这25个数添入5x5的格子中,使每横行,竖行,对角上五数之和都相等.

23 2 6 15 19
11 20 24 3 7
4 8 12 16 25
17 21 5 9 13
10 14 18 22 1
行和:
23 + 2 + 6 + 15 + 19 = 65
11 + 20 + 24 + 3 + 7 = 65
4 + 8 + 12 + 16 + 25 = 65
17 + 21 + 5 + 9 + 13 = 65
10 + 14 + 18 + 22 + 1 = 65
列和:
23 + 11 + 4 + 17 + 10 = 65
2 + 20 + 8 + 21 + 14 = 65
6 + 24 + 12 + 5 + 18 = 65
15 + 3 + 16 + 9 + 22 = 65
19 + 7 + 25 + 13 + 1 = 65
对角线和:
23 + 20 + 12 + 9 + 1 = 65
19 + 3 + 12 + 21 + 10 = 65
定和:65