$3+$ [ Evenness and Oddness $]$

In a square table $N \times N$, all integers are written according to the following rule: 1 is placed in any position, 2 is placed in the row with the number equal to the column number containing 1, 3 is placed in the row with the number equal to the column number containing 2, and so on. By how much does the sum of the numbers in the column containing $N^{2}$ differ from the sum of the numbers in the row containing 1.
We will denote the cell at the intersection of row $a$ and column $b$ as $(a, b)$. Each of the numbers 1, $2, \ldots, N$ appears in this notation of all cells exactly $2N$ times: $N$ times as the column number and $N$ times as the row number. Suppose 1 is in the cell $(a, x)$. The row number where 2 is located, by the condition, is equal to the column number containing 1, that is, $x$. Therefore, 2 is in the cell $(x, y)$. Next, 3 is in the cell $(y, z)$, and so on; finally, $N^2$ is in some cell $(m, n)$. Clearly, the number $a$ appears inside (i.e., not at the beginning or the end) of the chain $(a, x) \rightarrow (x, y) \rightarrow (y, z) \rightarrow \ldots \rightarrow (m, n)$ an even number of times. Since $a$ is at the beginning of the chain and appears a total of an even number ($2N$) times, this number must also be at the end of the chain: $n = a$. Thus, the row containing 1 has the same number as the column containing $N^2$.

Consider any number $p$, except 1 and $N^2$, from the column containing $N^2$. The next number, that is, $p+1$, is, as follows from the proof, in the row containing the number 1. Therefore, each number from the column containing $N^2$ corresponds to a number that is one greater in the row containing 1. The exception is only $N^2$. Additionally, the number 1 also does not have a pair in the column. Therefore, the desired difference is $-1 \cdot (N-1) + N^2 - 1 = N^2 - N$.

## Answer

$N^2 - N$.