5. Let the three-digit number $n=\overline{a b c}$, if the lengths of the sides of a triangle can be formed by $a, b, c$ to form an isosceles (including equilateral) triangle, then the number of such three-digit numbers $n$ is ( )
A. 45
B. 81
C. 165
D. 216
【Answer】 $\mathrm{C}$
【Analysis】Test question analysis: For $a, b, c$ to form the sides of a triangle, they are obviously not 0. That is, $a, b, c \in\{1,2,3, \cdots ; 9\}$
(1) If they form an equilateral triangle, let the number of such three-digit numbers be $n_{1}$. Since the three digits in the three-digit number are the same, $\mathrm{n}_{1}=\mathrm{C}_{9}^{1}=9$
(2) If they form an isosceles (non-equilateral) triangle, let the number of such three-digit numbers be $\mathrm{n}_{2}$. Since the three-digit number contains only 2 different digits, set them as $a, b$. Considering the interchangeability of the triangle's legs and base, the number of digit pairs $(a,b)$ that can be chosen is $2 \mathrm{C}_{9}^{2}$. However, when the larger number is the base, let $a>b$, it must satisfy $b<a<2 b$. At this point, the digit pairs that cannot form a triangle are
\begin{tabular}{|l|l|l|l|l|l|l|l|l|l|}
\hline a & 9 & 8 & 7 & 6 & 5 & 4 & 3 & 2 & 1 \\
\hline b & 4,3 & 4,3 & 3,2 & 3,2 & & & & & \\
& 2,1 & 2,1 & 1 & 1 & 1,2 & 1,2 & 1 & 1 & \\
\hline
\end{tabular}

There are a total of 20 cases. Meanwhile, for each digit pair $(\mathrm{a}, \mathrm{b})$, the two digits can be filled into three positions in $\mathrm{C}_{3}^{2}$ ways. Therefore, $\mathrm{n}_{2}=\mathrm{C}_{3}^{2}\left(2 \mathrm{C}_{9}^{2}-20\right)=156$. In summary, $\mathrm{n}=\mathrm{n}_{1}+\mathrm{n}_{2}=165$.

【Exam Point】 Permutation and combination problems.