Problem 10.4. Roma thought of a natural number, the sum of the digits of which is divisible by 8. Then he added 2 to the thought number and again got a number, the sum of the digits of which is divisible by 8. Find the smallest number that Roma could have thought of.
Answer: 699.

Solution. If both numbers are divisible by 8, then their difference is also divisible by 8. If there was no carry-over when adding, the sum of the digits would differ by 2, which is not divisible by 8. If there was a carry-over but not into the hundreds place, the sum of the digits would differ by $9-2=7$, which is also not divisible by 8. If there was a carry-over into the hundreds place but not into the thousands place, the sum of the digits would change by $2 \cdot 9-2=16$, which is divisible by 8.

For a carry-over into the hundreds place when adding two, the last two digits must be 98 or 99. Now, let's find the smallest number in each case with a sum of digits divisible by 8. These numbers are 798 and 699; it is clear that 699 is smaller (and it obviously meets the condition).

It remains to note that if there was a carry-over into the thousands place or higher when adding 2, the original number would be at least 998, but the found number is already smaller.