(modulo 5) Find all positive integers $n$ such that

$$
1!+2!+\ldots+n!
$$

is a perfect square.
If $n \geqslant 5$, then $1!+2!+\ldots+n!\equiv 1+2+6+24 \equiv 3[5]$. Or, modulo 5, we have: : | $x$ | 0 | 1 | 2 | 3 | 4 |
| ---: | ---: | ---: | ---: | ---: | ---: |
| $x^{2}$ | 0 | 1 | 4 | 4 | 1 | . Thus, $n \leqslant 5$. By testing manually, we find that only $n=1$ and $n=3$ work.