8. Given that $x$ is a four-digit number, the sum of its digits is $y$. If the value of $\frac{x}{y}$ is minimized, then $x=$ $\qquad$ .
8. 1099.

Solution: Let $x=\overline{a_{1} a_{2} a_{3} a_{4}}$, where $a_{1} \in \mathbf{N}_{+}, a_{2}, a_{3}, a_{4} \in \mathbf{N}$, then,
$$
\begin{array}{l}
\quad \frac{x}{y}=\frac{1000 a_{1}+100 a_{2}+10 a_{3}+a_{4}}{a_{1}+a_{2}+a_{3}+a_{4}}=10+9 \times \\
\frac{111 a_{1}+11 a_{2}+a_{3}}{a_{1}+a_{2}+a_{3}+a_{4}},
\end{array}
$$

To make $\frac{x}{y}$ the smallest, then $a_{4}=9$, at this time $\frac{x}{y}=1+9 \times$
$$
\frac{111 a_{1}+11 a_{2}+a_{3}}{a_{1}+a_{2}+a_{3}+9}=10+9 \times \frac{110 a_{1}+10 a_{2}-9}{a_{1}+a_{2}+a_{3}+9} \text {, }
$$

To make $\frac{x}{y}$ the smallest, then $a_{3}=9$, at this time $\frac{x}{y}=10+9 \times$
$$
\frac{111 a_{1}+10 a_{2}-9}{a_{1}+a_{2}+18}=100+9 \times \frac{100 a_{1}-189}{a_{1}+a_{2}+18},
$$

If $a_{1}=1$, then $\frac{x}{y}=100-9 \times \frac{89}{a_{2}+19}$, to make $\frac{x}{y}$ the smallest, then $a_{2}=0$, at this time $x=1099, \frac{x}{y 19}=1099$,
If $a_{2}>1$ to make $\frac{x}{y}$ the smallest, then $a_{2}=9$, at this time,
$$
\begin{array}{l}
\quad \frac{x}{y}=100+9 \times \frac{100 a_{1}-189}{a_{1}+27}=100-9 \times \\
\frac{9 \times 3 \times 107}{a_{1}+27},
\end{array}
$$

To make $\frac{x}{y}$ the smallest, then $a_{1}=2$, at this time $x=2999, \frac{x}{y}=$ $\frac{2999}{29}$, since $\frac{2999}{29}>\frac{1099}{19}$, so $x=1099$.