35. Find the total number of positive four-digit integers $N$ satisfying both of the following properties:
(i) $N$ is divisible by 7 , and
(ii) when the first and last digits of $N$ are interchanged, the resulting positive integer is also divisible by 7. (Note that the resulting integer need not be a four-digit number.)
35. Ans: 210
Let $a b c d=1000 a+100 b+10 c+d$ be a four-digit number divisible by 7. In particular, $1 \leq a \leq 9$. We are given that $d b c a=1000 d+100 b+10 c+a$ is also divisible by 7 . Observe that
$$
a b c d-d b c a=999 a-999 d=999(a-d) .
$$

Since 7 does not divide 999, it follows that 7 must divide $a-d$. Thus $a \equiv d$ mod 7. Since 7 divides 1001 , we have
$$
\begin{aligned}
& 1000 a+100 b+10 c+d \equiv 0 \bmod 7 \\
\Longrightarrow & -a+100 b+10 c+d \equiv 0 \bmod 7 \\
\Longrightarrow & 100 b+10 c \equiv 0 \bmod 7 \\
\Longrightarrow & 10(10 b+c) \equiv 0 \bmod 7 \\
\Longrightarrow & 10 b+c \equiv 0 \bmod 7 .
\end{aligned}
$$

Therefore we must have $a \equiv d \bmod 7$ and $10 b+c \equiv 0 \bmod 7$.
Conversely, by reversing the above arguments, one easily sees that if $a \equiv d$ mod 7 and $10 b+c \equiv 0 \bmod 7$, then both abcd and dbca are divisible by 7 .
Now there are 14 pairs of $(a, b)$ satisfying $a \equiv d \bmod 7$, which are
$$
(1,1),(2,2),(3,3), \ldots,(9,9),(1,8),(2,9),(7,0),(8,1),(9,2) \text {. }
$$

Since $0 \leq 10 b+c \leq 99$, there are 15 pairs of $(b, c)$ satisfying $10 b+c \equiv 0 \bmod 7$ (including $(0,0)$ ). In fact, this is equal to the number of non-negative integers less that 100 that are divisible by 7 . Therefore, there are $14 \times 15=210$ numbers with the required properties.