6. Robot Petya displays three three-digit numbers on the screen every minute, which sum up to 2019. Robot Vasya swaps the first and last digits in each of these numbers and then adds the resulting numbers. What is the largest sum Vasya can obtain?
6. Answer. 2118. Solution. Let the original numbers be $\overline{a_{1} b_{1} c_{1}}, \overline{a_{2} b_{2} c_{2}}, \overline{a_{3} b_{3} c_{3}}$, then $100\left(a_{1}+a_{2}+a_{3}\right)+10\left(b_{1}+b_{2}+b_{3}\right)+\left(c_{1}+c_{2}+c_{3}\right)=2019$. Let $S=100\left(c_{1}+c_{2}+c_{3}\right)+10\left(b_{1}+b_{2}+b_{3}\right)+\left(a_{1}+a_{2}+a_{3}\right)$. To maximize $S$, we need the following value to be the smallest: $2019-S=99\left(a_{1}+a_{2}+a_{3}\right)-99\left(c_{1}+c_{2}+c_{3}\right)$. We need to find the minimum value of $a_{1}+a_{2}+a_{3}$ and the maximum value of $c_{1}+c_{2}+c_{3}$. Note that the sum of the digits $a_{1}+a_{2}+a_{3}$ cannot be less than 18, since the sum $10\left(b_{1}+b_{2}+b_{3}\right)+\left(c_{1}+c_{2}+c_{3}\right)$ is definitely less than 300. And the sum of the digits $c_{1}+c_{2}+c_{3}$ ends in 9, so it cannot be more than 19. If $a_{1}+a_{2}+a_{3}=18$ and $c_{1}+c_{2}+c_{3}=19$, then we get the minimum possible difference $2019-S=-99 \Rightarrow S=2118$. An example of a suitable triplet of numbers: 365, 785, and 869 (there are other options).

Grading criteria. Correct solution - 7 points, evaluation without example - 4 points, example only - $\mathbf{2}$ points, in all other cases - 0 points.