5. There are ten numbers $x_{1}, x_{2}, \cdots, x_{10}$, where the maximum number is 10 and the minimum number is 2. If $\sum_{i=1}^{10} x_{i}=70$, then the maximum value of $\sum_{i=1}^{10} x_{i}^{2}$ is $\qquad$ .
5. 628 .

From the adjustment method, to find the maximum value of $\sum_{i=1}^{10} x_{i}^{2}$, each $x_{i}$ should be as large as possible for the larger numbers and as small as possible for the smaller numbers under the given conditions. We can take six 10s, three 2s, and one 4.
Therefore, $\sum_{i=1}^{10} x_{i}^{2}=600+28=628$.