5. In a $3 \times 3$ table, the following numbers are written:

| 10 | 20 | 40 |
| :---: | :---: | :---: |
| 32 | 61 | 91 |
| 100 | 1000 | 2000 |

It is allowed to swap any two numbers in one move. What is the minimum number of moves required to achieve that the sum of the numbers in each column is divisible by $3 ?$
Answer: 2. Solution.

| 1 | 2 | 1 |
| :--- | :--- | :--- |
| 2 | 1 | 1 |
| 1 | 1 | 2 |

Let's write down the remainders of these numbers when divided by 3. It is not hard to notice that the sum of the numbers is divisible by 3 if and only if the sum of the corresponding remainders is divisible by 3. The remainders equal to 2 need to be gathered in one column, which will require no less than 2 moves. It is clear that this can be done in 2 moves.