Each cell of an $n \times n$ grid contains a lamp, which can be on or off, with a switch. If you press the switch of a lamp, you change the state of this lamp, the lamps in the same row, and the lamps in the same column. For which integers $n$ is it possible to reach the configuration where all lamps are on, regardless of the initial configuration?
(Solved by Etienne Rossignol)

Answer: Only for even $n$.

If $n$ is even, you can change the state of a single lamp by pressing all the lamps in its row and column. It is therefore easy to go from any state to another.

If $n$ is odd, pressing a lamp does not change the parity of the number of lamps that are on. It is therefore impossible to achieve the configuration where $n^{2}-1$ lamps are on at the same time.