80. Let $a_{1}, a_{2}, \cdots, a_{n}$ be non-negative real numbers, and satisfy $a_{1}+a_{2}+\cdots+a_{n}=n$. Find the minimum value of the expression $S$. $S=a_{1}^{2}+a_{2}^{2}+\cdots+a_{n}^{2}+a_{1} a_{2} \cdots a_{n}\left(\frac{1}{a_{1}}+\frac{1}{a_{2}}+\cdots \frac{1}{a_{n}}\right)$ (Pham kim Hung)
Consider the following function
$$F=f\left(a_{1}, a_{2}, \cdots, a_{n}\right)=a_{1}^{2}+a_{2}^{2}+\cdots+a_{n}^{2}+a_{1} a_{2} \cdots a_{n}\left(\frac{1}{a_{1}}+\frac{1}{a_{2}}+\cdots \frac{1}{a_{n}}\right)$$

We have the following interesting identity:
$$\begin{array}{l}
f\left(a_{1}, a_{2}, \cdots, a_{n}\right)-f\left(0, a_{1}+a_{2}, a_{3}, \cdots, a_{n}\right)=a_{1} a_{2}\left[a_{3} a_{4} \cdots a_{n}\left(\frac{1}{a_{3}}+\frac{1}{a_{4}}+\cdots \frac{1}{a_{n}}\right)-2\right] \\
f\left(a_{1}, a_{2}, \cdots, a_{n}\right)-f\left(\frac{a_{1}+a_{2}}{2}, \frac{a_{1}+a_{2}}{2}, a_{3}, \cdots, a_{n}\right)=\frac{\left(a_{1}-a_{2}\right)^{2}}{4}\left[2-a_{3} a_{4} \cdots a_{n}\left(\frac{1}{a_{3}}+\frac{1}{a_{4}}+\cdots \frac{1}{a_{n}}\right)\right]
\end{array}$$

Therefore, at least the following inequalities must hold:
$$\begin{array}{l}
F \geq f\left(0, a_{1}+a_{2}, a_{3}, \cdots, a_{n}\right) \\
F \geq f\left(\frac{a_{1}+a_{2}}{2}, \frac{a_{1}+a_{2}}{2}, a_{3} \cdots, a_{n}\right)
\end{array}$$

Without loss of generality, we assume \(a_{1} \geq a_{2} \geq \cdots \geq a_{n}\). Consider the transformation:
$$\left(a_{i}, a_{j}\right) \rightarrow\left(\frac{a_{i}+a_{j}}{2}, \frac{a_{i}+a_{j}}{2}\right)$$

If \(\left(\prod_{k \neq i, j} a_{k}\right)\left(\sum_{k \neq i, j} \frac{1}{a_{k}}\right)<2\), then \(F\) will decrease after the transformation. If after such a transformation, for every \(\left\{i_{1}, i_{2}, \cdots, i_{n-2}\right\} \subset\{1,2, \cdots, n\}\), we have \(a_{i_{1}} a_{i_{2}} \cdots a_{i_{n-2}}\left(\frac{1}{a_{i_{1}}}+\frac{1}{a_{i_{2}}}+\cdots+\frac{1}{a_{i_{n-2}}}\right)<2\), we can conclude that \(F\) reaches its minimum value only when all \(n\) variables are equal. In this case, we have \(\min F=2 n\). Otherwise, there exists a transformation such that
$$\left(\prod_{k=1}^{n-2} a_{i_{k}}\right)\left(\sum_{k=1}^{n-2} \frac{1}{a_{i_{k}}}\right) \geq 2$$

According to (*), \(F\) reaches its minimum value only when the smallest element in the set \(\left\{a_{1}, a_{2}, \cdots, a_{n}\right\}\) is equal to 0. In this case, we have
$$F=g\left(a_{1}, a_{2}, \cdots, a_{n-1}\right)=a_{1}^{2}+a_{2}^{2}+\cdots+a_{n-1}^{2}+a_{1} a_{2} \cdots a_{n-1} \text { . }$$

Using the same method, we can get that at least the following inequalities hold:
$$\begin{array}{l}
g\left(a_{1}, a_{2}, \cdots, a_{n-1}\right) \geq g\left(0, a_{1}+a_{2}, a_{3}, \cdots, a_{n-1}\right) \\
g\left(a_{1}, a_{2}, \cdots, a_{n-1}\right) \geq g\left(\frac{a_{1}+a_{2}}{2}, \frac{a_{1}+a_{2}}{2}, a_{3}, \cdots, a_{n-1}\right),
\end{array}$$

Using the same function \(g\), we get that \(g\left(a_{1}, a_{2}, \cdots, a_{n-1}\right)\) reaches its minimum value if and only if all elements in the set \(\left\{a_{1}, a_{2}, \cdots, a_{n-1}\right\}\) are equal or \(n-2\) elements are equal and the other elements are 0. This fact indicates that
$$\min F=\min \left(2 n, \frac{n^{2}}{n-2}, \frac{n^{2}}{n-1}+\left(\frac{n}{n-1}\right)^{n-1}\right)$$