1. A natural number is called a palindrome if it is equal to the number obtained by reading the digits of its base ten representation from right to left (for example, 68386 and 44 are palindromes, 220 is not). We know that the natural number $x$ and the number $x+312$ are both palindromes; $x$ has four digits, while $x+312$ has five. What is the sum of the digits of $x$?
(A) 30
(B) 31
(C) 32
(D) 33
(E) 34
1. The answer is $(\mathbf{E})$. If $x$ is a 4-digit number (thus less than 10000), $x+312$, which must have 5 digits, is between 10000 and 10311 (inclusive). This means that the first two digits of $x+312$ are 1 and 0; since it is a palindromic number, it must be of the form $10 a 01$ for some digit $a$. On the other hand, $x=10 a 01-312$ ends with 89; it follows that the only possibility for $x$ is 9889, and indeed $9889+312=10201$ has 5 digits and is a palindrome. In conclusion, the sum of the digits of $x$ is $9+8+8+9=34$.