$5 . n$ is a known positive integer, $0 \leqslant r \leqslant n, r \in \mathbf{Z}$. Then when $r!(n-r)!$ takes the minimum value, $r=$ $\qquad$ .
5. $\left\{\begin{array}{cl}\frac{n}{2}, & n \text { is even; } \\ \frac{n-1}{2} \text { or } \frac{n+1}{2}, & n \text { is odd }\end{array}\right.$