# Random Generator

*English translation by SOTA – AI Community of the Russian original. Organisers who would like this translation removed can email sota.ai.community@gmail.com.*

All-Russian School Olympiad in Informatics 2025–2026, Final Stage<br>
“Artificial Intelligence” profile, Tour 1, Moscow, 23 March 2026<br>
Task B

A random number generator works as follows. If it is given a natural number $m \geq 6$, it outputs 10 natural numbers one after another. Each number is chosen by it independently and with equal probability from the set $\{1, 2, \ldots, m\}$.

Because of a system error, the generator's result is displayed on the screen as follows: the numbers $1, 2, 3, 4, 5$ are displayed unchanged, and in place of any other number the number $6$ is displayed.

For which natural number $m \geq 6$ is the probability of getting the sequence of numbers

$$6,\ 2,\ 6,\ 6,\ 1,\ 6,\ 4,\ 6,\ 3,\ 5$$

on the screen the greatest?
