The number of integers for which $n-S_n=1234$ For a positive integer $n$ , let $S_n$ denotes the sum of digits of $n$.The number of integers for which $n-S_n=1234$,equals
I really don't know what to do in this  .
I don't know  $\bmod$  thing .
 A: Notice $n\equiv S_n\bmod 9$, therefore $n-S_n$ is a multiple of $9$, while $1234$ is not. So there are $0$ values and we are done.
A: Here's an explanation without using mod. Suppose we have a number $ABCD$ such that $ABCD-(A+B+C+D)=1234$. Then:
$1000A+100B+10C+D-A-B-C-D=1234\\999A+99B+9C=1234\\9(111A+11B+C)=1234$
But $1234$ is not a multiple of $9$, so this is impossible. You can see that the same thing happens for any number of digits, so if we take any number and subtract its digit sum, the result is always a multiple of $9$.
A: Without using modular arithmetic, and without even a divisibility argument, you can see that $S_n$ for $n$ somewhere in the region of $1234$ can't be more than $1+2+9+9=21 \implies$ not more than $1+2+4+9=16$. So there are only a few numbers to search.
$$\begin{array}{c|c}
n & S_n & \text{diff}\\ \hline
1234 & 10 & 1224\\
1235 & 11 & 1224\\
\cdots &  & \cdots\\
1239 & 15 & 1224\\
1240 & 7 & 1233\\
1241 & 8 & 1233\\
\cdots &  & \cdots\\
1249 & 16 & 1233\\
1250 & 8 & 1242\\
\end{array}$$
... and no values qualify.
Looking at the numbers directly doesn't always solve problems like this but sometimes it shows some interesting patterns that can start you in useful directions.
