12. (20 points) Find the smallest positive integer $n$ such that
$$
[\sqrt{n}+\sqrt{n+1}]=[\sqrt{4 n+2016}]
$$
12. Let $k=[\sqrt{n}+\sqrt{n+1}]=[\sqrt{4 n+2016}]$.

Then $k$ is a positive integer, and
$$
\begin{array}{l}
\left\{\begin{array}{l}
k \leqslant \sqrt{n}+\sqrt{n+1}<k+1, \\
k \leqslant \sqrt{4 n+2016}<k+1
\end{array}\right. \\
\Leftrightarrow\left\{\begin{array}{l}
k^{2} \leqslant 2 n+1+2 \sqrt{n^{2}+n}<(k+1)^{2}, \\
k^{2} \leqslant 4 n+2016<(k+1)^{2} .
\end{array}\right.
\end{array}
$$

Also, $n<\sqrt{n^{2}+n}<n+1$, combining with equation (1) we get
$$
k^{2}<2 n+1+2(n+1)=4 n+3 \text {. }
$$

From equations (2) and (3), we know
$$
k^{2}<4 n+3<4 n+2016<(k+1)^{2} \text {. }
$$

Since $k^{2}$ is a perfect square, $k^{2}$ modulo 4 is 0 or 1.
$$
\begin{array}{l}
\text { Hence } k^{2} \leqslant 4 n+1<4 n+3 \\
<4 n+2016<(k+1)^{2} \\
\Rightarrow(4 n+2016)-(4 n+1)<(k+1)^{2}-k^{2} \\
\Rightarrow 2015<2 k+1 \Rightarrow k \geqslant 1008 \\
\Rightarrow 4 n+1 \geqslant k^{2} \geqslant 1016064 \\
\Rightarrow n \geqslant 254016 .
\end{array}
$$

When $n=254016$,
$$
[\sqrt{n}+\sqrt{n+1}]=1008=[\sqrt{4 n+2016}] \text {. }
$$

Therefore, the minimum value of $n$ is 254016.