5. (10 points) For a decimal natural number $n, S(n)$ denotes the sum of the digits of $n$. How many three-digit numbers $a$ satisfy $S(a)=S(2a)$?
【Analysis】According to the "advance one subtract nine" number puzzle rule, when performing addition, each carry reduces the sum of the digits by 9. For example, $35+8=43,3+5+8=16,4+3=7,16-7=9$. Carrying twice reduces the sum of the digits by 18, for example, $67+44=111,6+7+4+4=21,1+1+1=3,21-3=18$. Similarly, carrying three times reduces the sum of the digits by 27. Because $S(a)=S(2 a)$, it must involve a carry to meet the condition, and the carry will reduce by 9, 18, or 27. For example, $108+108=216$, one carry reduces the sum of the digits by 9, and the two sums are equal. The required three-digit number must be a multiple of 9. Therefore, those that do not carry or carry too many times do not meet the condition.

【Solution】
Solution 1: Let $a$ represent the three-digit number that meets the condition.
$$
0=S(2 a)-S(a) \equiv S(2 a-a) \equiv S(a) \pmod{9},
$$

So $a$ is a multiple of 9. There are 100 multiples of 9 among the three-digit numbers: $12 \times 9, 13 \times 9, \cdots, 111 \times 9$.
(1) Digits $5 > x \geqslant y \geqslant z \geqslant 0$, and the sum of the digits is 9. The sets $\{x, y, z\}=\{4,4,1\},\{4,3,2\},\{3,3,3\}$.

The set $\{4,4,1\}$ can form 3 three-digit numbers, the set $\{4,3,2\}$ can form 6 numbers, and the set $\{3,3,3\}$ can form 1 three-digit number.

These 10 numbers do not meet the condition.
(2) Let $a=100 x+10 y+z$, where $x, y, z$ are digits, then $2 a=100 \times 2 x+10 \times 2 y+2 z$.

If one of $x, y, z$ is not less than 5, for example, $y>5$ then $2 y=10+m, 0 \leqslant m \leqslant 8$.
$2 a=100 \times (2 x+1)+10 \times m+2 z, S(2 a)=2 x+1+m+2 z=2 x+1+(2 y-10)+2 z=2(x+y+z)-9=2 S(a)-9$,

Similarly, it can be proven that when $x, y, z$ have $k (0 \leqslant k \leqslant 3)$ digits greater than 5, $S(2 a)=S(a)-9 k$,

Therefore, the three-digit numbers formed by the sets $\{x, y, z\}$ where $x \geqslant 5 > y \geqslant z \geqslant 0$ and their sum is 9 meet the condition. Three-digit numbers with a sum of 9 cannot have 2 digits greater than 4.
(3) Three-digit numbers with a sum of 18 must have at least 2 digits greater than 4. As explained above, three-digit numbers with a sum of 18 and exactly 2 digits greater than 4 meet the condition. Three-digit numbers with a sum of 19 and exactly 3 digits greater than 4 are the sets:
$$
\{x, y, z\}, x \leqslant y \leqslant z .\{x, y, z\}=\{5,5,8\} ;\{5,6,7\} ;\{6,6,6\} ;
$$

The set $\{5,5,8\}$ can form 3 numbers, the set $\{5,6,7\}$ can form 6 three-digit numbers, and the set $\{6,6,6\}$ can form 1 three-digit number, totaling 10 numbers. These 10 three-digit numbers do not meet the condition.
(4) The three-digit number with a sum of 27 is only 999, which meets the condition.

In summary, among the 100 multiples of 9, 20 do not meet the condition, so there are 80 three-digit numbers that meet the condition.

Solution 2: Among the three-digit numbers, every 100 numbers contain 10 multiples of 9. From 100 to 999, there are 100 multiples of 9. When $S(a)=9$, a carry is needed once to meet the condition. Three-digit numbers with all digits less than 5 do not carry and do not meet the condition:
$(2,3,4)$ combinations form 6 numbers, $(1,4,4)$ combinations form 3 numbers, $(3,3,3)$ form 1 number. When $S(a)=18$, a carry is needed twice to meet the condition. Three-digit numbers with all digits greater than 4 carry three times and do not meet the condition: $(5,5,8)$ combinations form 3 numbers, $(5,6,7)$ combinations form 6 numbers, $(6,6,6)$ combinations form 1 number. When $S(a)=27$, 999 meets the condition.
100 multiples of 9 have 20 that do not meet the condition $100-20=80$.
The answer is: 80.