10.5. 10.5 A - a four-digit number composed of non-zero digits, B the number written with the same digits in reverse order. It is known that the sum A+B is divisible by 109. What can the sum of the digits of A be?
Solution. Let $\mathrm{A}=\overline{a b c d}(a, b, c, d$ - digits), i.e., $\mathrm{A}=1000 a+100 b+10 c+d$. Then $\mathrm{B}=1000 d+100 c+10 b+a$ and $\mathrm{A}+\mathrm{B}=1001 a+110 b+110 c+1001 d$.

In the last sum, we isolate the largest possible part that is definitely divisible by 109:

$\mathrm{A}+\mathrm{B}=(981+20) a+(109+1) b+(109+1) c+(981+20) d=109(9 a+b+c+9 d)+20 a+b+c+20 d$.

Now we see that the number $\mathrm{A}+\mathrm{B}$ is divisible by 109 only if the number $h=20 a+b+c+20 d$ is divisible by 109. The number $h$ lies within the range from $20 \cdot 1+1+1+20 \cdot 1=42$ to $20 \cdot 9+9+9+20 \cdot 9=378$. Within these bounds, only three numbers are divisible by 109. These are $109, 218, 327$. Accordingly, we will consider three cases.

1) $20 a+b+c+20 d=109.20(a+d)+b+c=109$.

Since $2 \leq b+c \leq 18$, then $91 \leq 20(a+d) \leq 107$, from which we get the only possibility for $a+d$ as $a+d=5$. But then $b+c=9$. Therefore, in this case, the sum of the digits $a + b + c + d = 14$.

Example: A=2543, B $=3452, \mathrm{~A}+\mathrm{B}=5995=55 \cdot 109$.
2) $20(a+d)+b+c=218 . \quad 200 \leq 20(a+d) \leq 216, \quad a+d=10, b+c=18$ (i.e., $b=c=9$), in this case $a+b+c+d=28$.

Example: A=3997, B $=7993, A+B=11990=110 \cdot 109$.
3) $20(a+d)+b+c=327 . \quad 309 \leq 20(a+d) \leq 325, \quad a+d=16, \quad b+c=7$, in this case $a+b+c+d=23$.

Example: A=7169, B $=9617, \mathrm{~A}+\mathrm{B}=16786=154 \cdot 109$.

Answer: 14, or 23, or 28.