7. Find all positive integers $n$ such that $n-[n\{\sqrt{n}\}]=2$ holds.
$(2002$, Bulgarian Spring Mathematical Competition)
Solution: If $n=p^{2}$, then $\{\sqrt{n}\}=0$, which implies $n=2$, contradicting $n=p^{2}$. Therefore, there exists an integer $t$ such that $(t-1)^{2}<n<t^{2}$, hence $[\sqrt{n}]$
$$
\begin{aligned}
=t & -1 \text {. Also, } \\
& n-[n\{\sqrt{n}\}]=n-[n(\sqrt{n}-[\sqrt{n}])] \\
& =n-[n(\sqrt{n}-t+1)]=n-[n \sqrt{n}]+n t-n \\
& =n t-[n \sqrt{n}] .
\end{aligned}
$$

Therefore, the original equation is equivalent to $n t=2+[n \sqrt{n}]$.
Let $n=t^{2}-k$, when $k \geqslant 2$, $n \sqrt{n+2} \leqslant n \sqrt{n+k}$ $=n t=2+[n \sqrt{n}] \leqslant 2+n \sqrt{n}$, i.e., $n(\sqrt{n+2}-\sqrt{n}) \leqslant 2$, $n \leqslant \sqrt{n+2}+\sqrt{n} \cdot n^{2} \leqslant 2 n+2+2 \sqrt{n(n+2)}<2 n+2$ $+2(n+1)=4(n+1)$. The inequality holds only when $n=1,2,3,4$. Upon verification, $n=2$ is a solution to the original equation. When $k=1$, similarly, we get $n \leqslant 2(\sqrt{n+1}+\sqrt{n})<4 \sqrt{n+1}$, i.e., $t^{2}-1$ $<4 t, t \leqslant 4$. The inequality holds only when $n=3,8,15$. Upon verification, $n=8, n=15$ are solutions to the original equation.
In summary, $n=2,8,15$.