9,10,11 |
| :---: | :---: | :---: |
|  | Division with remainder |  |
|  | Product rule |  |
|  | Cooperative algorithms  Evaluation + example |  |

Authors: Knyaz K.A., Leontyeva O.

A magician and an assistant are going to perform the following trick. A spectator writes a sequence of $N$ digits on a board. The assistant then covers two adjacent digits with a black circle. The magician then enters and his task is to guess both covered digits (and the order in which they are arranged). For what smallest $N$ can the magician and the assistant agree on a strategy to ensure the trick always succeeds?
Suppose that for some value of $N$ the trick is possible. Then for each variant of the sequence with two closed digits (let their quantity be $k_{1}$), the magician can restore the original; hence, to each sequence with two closed digits, the magician can uniquely correspond the restored sequence of $N$ digits (let their quantity be $k_{2}$). Therefore, $k_{1} \geq k_{2}$. Note that $k_{1}=(N-1) 10^{N-2}$ (there are $N-1$ ways to cross out two digits, and for the remaining $N-2$ positions, there are 10 options for each). And $k_{2}=10^{N}$. Thus, $N-1 \geq 100$, that is, $N \geq 101$.

We will show how to perform the trick for $N=101$. Let the sum of all digits in odd positions have a remainder $s$ when divided by 10, and the sum of all digits in even positions have a remainder $t$ when divided by 10 (positions are numbered from left to right by numbers from 0 to 100). Let $p=10 s+t$. Suppose the assistant covers the digits in positions $p$ and $p+1$. Seeing which digits are covered, the magician will determine $p$, and consequently, determine $s$ and $t$. Note that one covered digit is in an odd position, and the other is in an even position. Thus, by calculating the sum of the open digits in odd positions and knowing $s$, the magician will determine the covered digit in the odd position. Similarly, the covered digit in the even position is determined.

## Answer

For $N=101$.