Problem 166
Criss Cross
A $4\times 4$ grid is filled with digits $d$, $0 \le d \le 9$.
It can be seen that in the grid
$$\begin{matrix}
6 & 3 & 3 & 0 \\
5 & 0 & 4 & 3 \\
0 & 7 & 1 & 4 \\
1 & 2 & 4 & 5 \\
\end{matrix}$$
the sum of each row and each column has the value $12$. Moreover the sum of each diagonal is also $12$.
In how many ways can you fill a $4\times 4$ grid with the digits $d$, $0 \le d \le 9$ so that each row, each column, and both diagonals have the same sum?
纵横交错
一个$4\times 4$方阵填满了$0\le d\le 9$的数字。
可以看出,在如下方阵中
$$\begin{matrix}
6 & 3 & 3 & 0 \\
5 & 0 & 4 & 3 \\
0 & 7 & 1 & 4 \\
1 & 2 & 4 & 5 \\
\end{matrix}$$
每一行和每一列的和都是$12$,而且对角线上的数字和也都是$12$。
在$4\times 4$方阵中填入$0 \le d \le 9$的数字,要使得每一行、每一列和对角线上的和都是相同的数,有多少种填法?