Shapovalov A.V.

At every kilometer along the highway between the villages of Yolki and Palkino, there is a post with a sign. On one side of the sign, it shows how many kilometers are left to Yolki, and on the other side, how many kilometers are left to Palkino. Borya noticed that on each post, the sum of all the digits is 13. What is the distance from Yolki to Palkino?
Let the distance from Yolki no to Palki no be $n$ kilometers. It is clear that $n \geq 10$. Moreover, $n \leq 49$ (otherwise, the sum of the digits on the 49th sign would be greater than 13).

On the tenth sign from Yolki no, one side reads 10, and the other side reads $n-10$, which does not exceed 39. The sum of its digits is 12. Therefore, $n-10=39$ (the sum of the digits of smaller numbers does not exceed 11).

Send a comment