10. For $n \in \mathbf{N}$, let $S_{n}$ be the minimum value of $\sum_{k=1}^{n} \sqrt{(2 k-1)^{2}+a_{k}^{2}}$, where $a_{1}, a_{2}, a_{3}, \cdots, a_{n}$ are positive real numbers whose sum is 17. If there exists a unique $n$ such that $S_{n}$ is also an integer, find $n$.
$\begin{array}{l}\text { 10. Solution: } \because \sum_{k=1}^{n} \sqrt{(2 k-1)^{2}+a_{k}^{2}}=\sum_{k=1}^{n}\left|(2 k-1)+a_{k} \mathrm{i}\right|, k=1,2, \cdots, n, \\ \therefore \sum_{k=1}^{n}\left|(2 k-1)+a_{k} \mathrm{i}\right| \geqslant\left|1+a_{1} \mathrm{i}\right|+\left|3+a_{2} \mathrm{i}\right|+\cdots+\left|(2 n-1)+a_{n} \mathrm{i}\right| \geqslant \mid[1+3+\cdots+(2 n \\ -1)]+\left(a_{1}+a_{2}+\cdots+a_{n}\right) \mathrm{i}|=|\left(n^{2}+17 \mathrm{i}\right) \mid=\sqrt{n^{4}+17^{2}} . \\ \because S_{n} \in \mathbf{Z}^{+} \text {, let } S_{n}=m \text {, then } n^{4}+17^{2}=m^{2} \text {, i.e., } m^{2}-n^{4}=17^{2} . \\ \therefore\left(m+n^{2}\right)\left(m-n^{2}\right)=289 \text {, and } m, n \in \mathbf{N} . \\ \therefore m+n^{2}=289, m-n^{2}=1 \text {, solving gives } n=12 .\end{array}$