Question 141
Let $p \ge 2$ be a prime number. Alice and Bob play the following game: in turn, each of them selects an index $i$ in the set $\{0, 1, 2, \dots, p-1\}$ that was not selected before by either of the two players and then chooses a digit $a_i$. Alice starts. The game ends after all the indices have been selected. The goal of Alice is to make the number
$$
M = a_0 + 10 \cdot a_1 + 10^2 \cdot a_2 + \dots + 10^{p-1} a_{p-1}
$$
divisible by $p$, and the goal of Bob is to prevent this.
Prove that Alice has a winning strategy.
$$
M = a_0 + 10 \cdot a_1 + 10^2 \cdot a_2 + \dots + 10^{p-1} a_{p-1}
$$
divisible by $p$, and the goal of Bob is to prevent this.
Prove that Alice has a winning strategy.