Problem 3. Determine the values of the digits $a$ and $b$ so that the number $\overline{78 a 9 b}$ is divisible by 18.
Solution. The number $\overline{78 a 9 b}$ is divisible by 2 and 9, so according to this $b \in\{0,2,4,6,8\}$. We will consider each possibility separately.

a) for $b=0$ we get $7+8+9+a+b=24+a$, so according to this $a=3$.

b) for $b=2$ we get $a=1$,

c) for $b=4$ we get $a=8$,

d) for $b=6$ we get $a=6$

e) for $b=8$ we get $a=4$.