We call a 7-digit telephone number $d_{1} d_{2} d_{5}-d_{1} d_{2} d_{6} d_{7}$ "memorable" if the three digits $d_{1} d_{2} d_{3}$ exactly equal the sequence $d_{4} d_{7} d_{6}$ or $d_{5} d_{6} d_{7}$ (either case is possible). If each digit can be any of $0,1,2, \cdots, 9$, then the number of different "memorable" telephone numbers is ( )
(A) 19810
(B) 19910
(C) 19990
(D) 20000
5. (C).

Let $A$ and $B$ represent the sets where $d_{1} d_{2} d_{3}$ equals $d_{4} d_{5} d_{6}$ and $d_{1} d_{2} d_{3}$ equals $d_{5} d_{6} d_{7}$, respectively. By the principle of inclusion-exclusion, we have
$$
\begin{aligned}
|A \cup B| & =|A|+| B|-| A \cap B \mid \\
& =10 \times 10^{3} \times 1+10 \times 10^{3} \times 1-10 \\
& =19990 .
\end{aligned}
$$