18 Let $S=1+\frac{1}{\sqrt{2}}+\frac{1}{\sqrt{3}}+\cdots+\frac{1}{\sqrt{n}}$, to make $[S]=1994$, what should the value of $n$ be? ([S] represents the greatest integer not exceeding $S$).
18 Since $\frac{1}{\sqrt{n}}=\frac{2}{\sqrt{n}+\sqrt{n}}$, and
$$
\frac{2}{\sqrt{n+1}+\sqrt{n}}<\frac{2}{\sqrt{n}+\sqrt{n}}<\frac{2}{\sqrt{n}+\sqrt{n-1}},
$$

thus $2(\sqrt{n+1}-\sqrt{n})<\frac{1}{\sqrt{n}}<2(\sqrt{n}-\sqrt{n-1})$. Therefore,
$$
\begin{array}{c}
2(\sqrt{3}-\sqrt{2})<\frac{1}{\sqrt{2}}<2(\sqrt{2}-1) \\
2(\sqrt{4}-\sqrt{3})<\frac{1}{\sqrt{3}}<2(\sqrt{3}-\sqrt{2}), \\
\cdots \cdots \\
2(\sqrt{n+1}-\sqrt{n})<\frac{1}{\sqrt{n}}<2(\sqrt{n}-\sqrt{n-1}) .
\end{array}
$$

Adding the above inequalities and adding 1, we get
$$
2 \sqrt{n+1}-\sqrt{8}+1<S<2 \sqrt{n}-1 .
$$

Therefore, when $[S]=1994$, $n=995006$ (ignoring the decimal part).