25) Giovanni wants to draw a square made up of nine cells (three cells per side) and write in each cell a number chosen from $0,1,2,3,4$, in such a way that for any fixed row, column, or diagonal of the square, the sum of the numbers in its cells is always equal to 4. How many different squares can he build?
(A) None,
(B) 1,
(C) 2,
(D) 3,
(E) 4
25. The answer is (A).

If we have a square of three cells on each side, where, fixing any row, column, or diagonal, the sum of the numbers written in its cells (which we assume to be integers) is always equal to the same number $S$, then $S$ must be a multiple of three.

| $a$ | $b$ | $c$ |
| :--- | :--- | :--- |
| $d$ | $e$ | $f$ |
| $g$ | $h$ | $i$ |

Indeed, referring to the figure, we have:

$$
(d+e+f)+(b+e+h)+(a+e+i)+(c+e+g)=S+S+S+S=4 S.
$$

On the other hand,

$$
(a+b+c)+(d+e+f)+(g+h+i)=S+S+S=3 S.
$$

Subtracting the second equality from the first term by term, we find

$$
3 e=S
$$

which means $S$ is a multiple of 3. Therefore, there does not exist any square with the required properties where $S=4$.