Problem

Source: ISL 2018 N2

Tags: IMO Shortlist, number theory, Hi



Let $n>1$ be a positive integer. Each cell of an $n\times n$ table contains an integer. Suppose that the following conditions are satisfied: Each number in the table is congruent to $1$ modulo $n$. The sum of numbers in any row, as well as the sum of numbers in any column, is congruent to $n$ modulo $n^2$. Let $R_i$ be the product of the numbers in the $i^{\text{th}}$ row, and $C_j$ be the product of the number in the $j^{\text{th}}$ column. Prove that the sums $R_1+\hdots R_n$ and $C_1+\hdots C_n$ are congruent modulo $n^4$.