10. (20 points) For a positive integer $n$ and a real number $x (0 \leqslant x < n)$, define
$$
f(n, x)=(1-\{x\}) \mathrm{C}_{n}^{[x]}+\{x\} \mathrm{C}_{n}^{[x]+1},
$$

where $[x]$ denotes the greatest integer not exceeding the real number $x$, and $\{x\}=x-[x]$. If integers $m, n \geqslant 2$ satisfy
$$
f\left(m, \frac{1}{n}\right)+f\left(m, \frac{2}{n}\right)+\cdots+f\left(m, \frac{m n-1}{n}\right)=123,
$$

find the value of $f\left(n, \frac{1}{m}\right)+f\left(n, \frac{2}{m}\right)+\cdots+f\left(n, \frac{m n-1}{m}\right)$.
10. For $k=0,1, \cdots, m-1$, we have
$$
\begin{array}{l}
\sum_{i=1}^{n-1} f\left(m, k+\frac{i}{n}\right) \\
=\mathrm{C}_{m}^{k} \sum_{i=1}^{n-1}\left(1-\frac{i}{n}\right)+\mathrm{C}_{m}^{k+1} \sum_{i=1}^{n-1} \frac{i}{n} \\
=\frac{n-1}{2}\left(\mathrm{C}_{m}^{k}+\mathrm{C}_{m}^{k+1}\right) .
\end{array}
$$
$$
\begin{array}{l}
\text { Then } f\left(m, \frac{1}{n}\right)+f\left(m, \frac{2}{n}\right)+\cdots+f\left(m, \frac{m n-1}{n}\right) \\
=\sum_{j=1}^{m-1} \mathrm{C}_{m}^{j}+\sum_{k=0}^{m-1} \sum_{i=1}^{n-1} f\left(m, k+\frac{i}{n}\right) \\
=2^{m}-2+\frac{n-1}{2}\left(\sum_{k=0}^{m-1} \mathrm{C}_{m}^{k}+\sum_{k=0}^{m-1} \mathrm{C}_{m}^{k+1}\right) \\
=2^{m}-2+\frac{n-1}{2}\left(\left(2^{m}-1\right)+\left(2^{m}-1\right)\right) \\
=\left(2^{m}-1\right) n-1 .
\end{array}
$$

Similarly,
$$
\begin{array}{l}
f\left(n, \frac{1}{m}\right)+f\left(n, \frac{2}{m}\right)+\cdots+f\left(n, \frac{m n-1}{m}\right) \\
=\left(2^{n}-1\right) m-1 .
\end{array}
$$

From the condition, we have
$$
\begin{array}{l}
\left(2^{m}-1\right) n-1=123 \Rightarrow\left(2^{m}-1\right) n=124 \\
\Rightarrow\left(2^{m}-1\right) \mid 124 .
\end{array}
$$

Also, $m \geqslant 2$, thus,
$$
2^{m}-1 \in\{3,7,15,31,63,127, \cdots\},
$$

Only when $m=5$, $2^{m}-1=31$ is a divisor of 124, hence, $n=\frac{124}{31}=4$.
$$
\begin{array}{l}
\text { Therefore, } f\left(n, \frac{1}{m}\right)+f\left(n, \frac{2}{m}\right)+\cdots+f\left(n, \frac{m n-1}{m}\right) \\
=\left(2^{4}-1\right) \times 5-1=74 .
\end{array}
$$