Question 7
Some squares of a $n \times n$ table $(n\gt 2)$ are black, the rest are white. In every white square we write the number of all the black squares having at least one common vertex with it. Find the maximum possible sum of all these numbers.
The answer is $3 n^{2}-5 n+2$.
The answer is $3 n^{2}-5 n+2$.