Problem

Source: Rioplatense Math Olympiad Level 2, P5 2024

Tags: combinatorics, rioplatense, board



Let $n$ be a positive integer. Ana and Beto play a game on a $2 \times n$ board (with 2 rows and $n$ columns). First, Ana writes a digit from 1 to 9 in each cell of the board such that in each column the two written digits are different. Then, Beto erases a digit from each column. Reading from left to right, a number with $n$ digits is formed. Beto wins if this number is a multiple of $n$; otherwise, Ana wins. Determine which of the two players has a winning strategy in the following cases: $\bullet$ (a) $n = 1001$. $\bullet$ (b) $n = 1003$.