Question 24 Let $m \geqslant 14$ be an integer, and the function $f: \mathbf{N} \rightarrow \mathbf{N}$ is defined as follows:
$$
f(n)=\left\{\begin{array}{ll}
n-m+14 . & n>m^{2} ; \\
f(f(n+m-13)) & n \leqslant m^{2} .
\end{array}\right.
$$

Find all $m$ such that $f(1995)=1995$.
When $m^{2}m^{2}$, $f(n)$ can be directly obtained.
So if $f(1995)=1995$, there must exist $n_{0}>m^{2}$, such that $n_{0}-m+14=$ 1995. That is $\square$
$$
\begin{array}{l}
m^{2}-m+14<1995 \Rightarrow m^{2}-m-1981<0 \\
\Rightarrow \frac{1-\sqrt{1+4 \times 1981}}{2}<m<\frac{1+\sqrt{1+4 \times 1981}}{2} .
\end{array}
$$

Since
$$
\frac{1+\sqrt{1+4 \times 1981}}{2}<46 \text {, }
$$

then
$$
m \leqslant 45 \text {. }
$$

From this, we know that when $m=45$, $m^{2}=2025$.
$$
\begin{aligned}
f(1995) & =f(f(1995+45-13))=f(f(2027))=f(2027-45+141)=f(1996) \\
& =f(f(2028))=f(1997)=\cdots= \\
& =f(f(2057))=f(2026)=1995 .
\end{aligned}
$$

Therefore, the values of $m$ that make $f(1995)=1995$ are 14 or 45.