Brenner D....

All natural numbers from 1 to $N, N \geq 2$ are written in some order in a circle. For any pair of adjacent numbers, there is at least one digit that appears in the decimal representation of each of them. Find the smallest possible value of $N$.

#
Since single-digit numbers do not have common digits, then $N>9$. And since the numbers adjacent to the number 9 must contain a nine in their notation, the smaller one cannot be less than 19, and the larger one cannot be less than 29. Therefore, $N \geq 29$.

Equality $N=29$ is possible, since the conditions of the problem are satisfied, for example, by such an order of arranging the numbers from 1 to 29 in a circle:

$1,11,10,20,21,12,2,22,23,3,13,14,4,24,25,5,15,16,6,26,27,7,17,18,8,28,29,9,19$.

## Answer

29.00