v0.1 实现普通幻方与完美幻方的检查,幻方的定义参考:
A magic square is a n × n grid of numbers such that the sum of each row is equal, and equal to the sum of each column.
4 9 2
3 5 7
8 1 6
Some definitions also require the sum along the main diagonals to add to the same total.
普通幻方定义为行、列、主、副对角线各数之和均相等。
完美幻方(完全幻方)定义为行、列、主、副对角线及泛对角线各数之和均相等。