Problem: Find all functions $f \colon \NN \to \NN$ such that
$f(n!) = f(n)!$ for all positive integers $n$ and such that
$m-n$ divides $f(m) - f(n)$ for all distinct positive integers $m$, $n$.

Solution: Answer: $f \equiv 1$, $f \equiv 2$, and $f$ the identity.
As these obviously work, we prove these are the only ones.

By putting $n=1$ and $n=2$ we give $f(1), f(2) \in \{1,2\}$.
Also, we will use the condition
\[ m!-n! \text{ divides } f(m)! - f(n)!. \]
We consider four cases on $f(1)$ and $f(2)$,
and dispense with three of them.
\begin{itemize}
  \ii If $f(2) = 1$ then for all $m \ge 3$ we have
  $m!-2$ divides $f(m)! - 1$, so $f(m) = 1$
  for modulo $2$ reasons.
  Then clearly $f(1) = 1$.
  \ii If $f(1) = f(2) = 2$ we first obtain
  $3!-1 \mid f(3)!-2$, which implies $f(3) = 2$.
  Then $m! - 3 \mid f(m)! - 2$ for $m \ge 4$
  implies $f(m)=2$ for modulo $3$ reasons.
\end{itemize}
Hence we are left with the case where $f(1) = 1$ and $f(2) = 2$.
Continuing, we have
\[ 3!-1 \mid f(3)! - 1 \quad\text{and}\quad
  3!-2 \mid f(3)!-2 \implies f(3) = 3. \]

Continuing by induction, suppose $f(1) = 1$, \dots, $f(k) = k$.
\[ k! \cdot k = (k+1)! - k! \mid f(k+1)! - k! \]
and thus we deduce that $f(k+1) \ge k$, and hence
\[ k \mid \frac{f(k+1)!}{k!} - 1. \]
Then plainly $f(k+1) \le 2k$ for mod $k$ reasons,
but also $f(k+1) \equiv 1 \pmod k$ so we conclude $f(k+1) = k+1$.

\begin{remark*}
  Shankar Padmanabhan gives the following way
  to finish after verifying that $f(3) = 3$.
  Note that if
  \[ M = ( ( ( (3!)! )! )! \dots )! \]
  for any number of iterated factorials
  then $f(M) = M$.
  Thus for any $n$, we have
  \[ M-n \mid f(M) - f(n) = M - f(n) \implies M - n \mid n - f(n) \]
  and so taking $M$ large enough implies $f(n) = n$.
\end{remark*}