AIME 2015 I, Problem 8

For positive integer $n$, let $s(n)$ denote the sum of the digits of $n$.  Find the smallest positive integer satisfying $s(n) = s(n+864) = 20$.

Solution: First, it is easy to verify that $695$ works and that no other numbers beginning with the digit 6 work (i.e. $686, 677, 668, 659$ do not work). Suppose by contradiction that there is a smaller valid $n$, where the leading digit of the three-digit number $n$ is 5 or less. (Two-digit $n$ obviously do not work because 9 + 9 < 20.) Clearly $n > 200$ because the smallest three-digit number whose digits sum to 20 is $299$. Also, because the second digit is at most 9, the units digit is at least 6, which means that the addition $N = n + 864$ regroups in the ones place. Then the units digit of $N$ is clearly less than 4. But as $1000 < 200 + 864 < N < 600 + 864 = 1464$, the sum of the thousands digit and the hundredth digit is at most 5. Because the second digit is at most 9, the sum of the digits of $N$ is at most $5 + 9 + 4 < 20$, contradiction. Hence $\fbox{695}$ is the answer.

Answer: 695