2. Determine all three-digit numbers, written with different digits, such that the three-digit number is divisible by 7 and the sum of its digits is divisible by 7.
Solution. Let the three-digit number be $x=\overline{a b c}$. Then

$$
x=100 a+10 b+c=7(14 a+b)+(2 a+3 b+c)
$$

so $7 \mid(a+b+c)$ and $7 \mid(2 a+3 b+c)$. Therefore, 7 is a divisor of the difference $(2 a+3 b+c)-2(a+b+c)=b-c$. Now, from the condition that the digits $a, b, c$ must be different, it follows that the only numbers that satisfy the condition of the problem are $518, 581, 329$, and $392$.