8. Let $[a]$ denote the greatest integer not exceeding the real number $a$. Solve the equation
$$
\tan \pi x=\left[\lg \pi^{x}\right]-\left[\lg \left[\pi^{x}\right]\right] .
$$
8. $x$ can be any non-negative integer.
Notice that, the right side of the equation is meaningful when $\pi^{x} \geqslant 1$. Let $10^{n} \leqslant \pi^{x}<10^{n+1}$ ( $n$ is a non-negative integer). Then
$$
\begin{array}{l}
{\left[\lg \pi^{x}\right]=n} \\
\Rightarrow 10^{n} \leqslant\left[\pi^{x}\right]<10^{n+1} \\
\Rightarrow\left[\lg \left[\pi^{x}\right]\right]=n .
\end{array}
$$

Therefore, when $\pi^{x} \geqslant 1$, the right side of the equation is always 0. This indicates that the solutions to the equation are all non-negative integers.