11. In a code composed of decimal digits, if it contains an even number of the digit 8, it is called a "good code" (such as 3887, 2438086, etc.). The number of all "good codes" with a length not exceeding $n$ ($n$ being a positive integer) is $\qquad$
11. $\frac{1}{2}\left(\frac{10^{n+1}}{9}+\frac{8^{n+1}}{7}-\frac{142}{63}\right)$.

Solution: Let the number of "good codes" of length $n$ be $a_{n}$, then $a_{1}$ $=9$. For $a_{n}$: by appending 8 to the end of a non-"good code" of length $n-1$, it becomes a "good code" of length $n$, and there are $10^{n-1}-a_{n-1}$ such codes; by appending a digit other than 8 to the end of a "good code" of length $n-1$, it becomes a "good code" of length $n$, and there are $9 a_{n-1}$ such codes. Therefore, $a_{n}=9 a_{n-1}+10^{n-1}-a_{n-1}=$ $8 a_{n-1}+10^{n-1}$, thus, $a_{n}=\frac{1}{2}\left(10^{n}+8^{n}\right)$,
The required result is $\frac{1}{2}\left(\frac{10^{n+1}}{9}+\frac{8^{n+1}}{7}-\frac{142}{63}\right)$.