Problem 6.7. Petya thinks of a four-digit number of the form $\overline{20 * *}$.

Vasya sequentially checks if the number Petya thought of is divisible by 1, 3, 5, 7, 9, 11, and if it is, Vasya pays Petya 1, 3, 5, 7, 9, or 11 rubles respectively. For example, for the number 2000, Vasya would have paid Petya $1+5=6$ rubles.

What is the maximum number of rubles Petya can receive?
Answer: 31.

Solution. Suppose Petya's number is divisible by 9 and by 11. Then it is also divisible by 99. There is exactly one such number in the given range - it is $2079=3^{3} \cdot 7 \cdot 11$. For this number, Petya would receive $1+3+7+9+11=31$ rubles.

If Petya's number is not divisible by 9 or not divisible by 11, then he would receive no more than $1+3+$ $5+7+11=27$ rubles, which is less than 31.