5. The number 24 is written on the board. Lёsha and Vitya take turns changing the number: either by appending one digit to the end, or by erasing the last digit of the previous number, or by rearranging the digits of the previous number in any order (the number cannot start with zero). It is not allowed to leave the number unchanged, but it is possible to repeat what was done before. On the first move, Lёsha must get a number divisible by 2, then Vitya - divisible by 3, Lёsha - divisible by 4, and so on. Whoever cannot make a move loses. Who will win with correct play?
Answer: Lёsha will win.

Solution. Lёsha will win. The second number he gets by appending 0 at the end. Now the board shows 240. Next, if Vitya, by his move, transforms the number 240 into the number $B$, Lёsha again transforms $B$ into 240. This does not contradict the rules, since the number 240 is divisible by $4, 6, 8, 10, 12$. To get the 13th number, Vitya is forced to append 5 at the end (since 204, 402, and 420 are not divisible by 13), after which Lёsha rearranges the digits and gets 2450 (it is obviously divisible by 14). Vitya must achieve divisibility by 15, but this is impossible: the sum of the digits of the number 2450 is not divisible by 3, so rearrangement will not help. Erasing the last digit and appending zero does not change the sum of the digits. Appending 5 also results in a number not divisible by 3. Appending another digit at the end results in a number not divisible by 5.

Comment. An answer without justification - 0 points. A correct answer obtained using examples (the optimal strategy is not indicated) - 1 point. The optimal strategy for Lёsha is indicated, but not justified - up to 4 points. In the absence of proof, 1-2 points for potentially useful ideas.