5. Let $a_{1}, a_{2}, \cdots, a_{n}$ be positive real numbers, and satisfy $\sum_{k=1}^{n} a_{k}=1, \sum_{k=1}^{n} \frac{1}{a_{k}}=4$.
Then the value of $\prod_{k=1}^{n} a_{k}$ is $\qquad$
5. $\frac{1}{4}$.

By the Cauchy-Schwarz inequality, we know that $\left(\sum_{k=1}^{n} a_{k}\right) \sum_{k=1}^{n} \frac{1}{a_{k}} \geqslant n^{2}$.
Also, since $\left(\sum_{k=1}^{n} a_{k}\right) \sum_{k=1}^{n} \frac{1}{a_{k}}=4$, we have $n^{2} \leqslant 4$, and $n$ is a positive integer. Therefore, $n=1$ or 2.
When $n=1$, $a_{1}=1, \frac{1}{a_{1}}=4$, which is a contradiction.
When $n=2$, by the necessary and sufficient condition for equality in the Cauchy-Schwarz inequality, we have $a_{1}=a_{2}, a_{1}+a_{2}=1$.
Thus, $a_{1}=a_{2}=\frac{1}{2} \Rightarrow a_{1} a_{2}=\frac{1}{4}$.