10. (15 points) Given a set of positive integers $M=$ $\left\{a_{1}, a_{2}, \cdots, a_{n}\right\}$, the sum of its elements is 2009. Find the maximum value of the product of its elements.
10. $\frac{63!}{6}$.

Let 2009 be written as the sum of several different positive integers as
$$
2009=a_{1}+a_{2}+\cdots+a_{n},
$$

where, $a_{1}1$. Otherwise,
$$
\begin{array}{l}
a_{1} a_{2} \cdots a_{n}=a_{2} a_{3} \cdots a_{n} \\
a_{1} \text {, }
$$

a contradiction.
(3) There does not exist $1 \leqslant i \leqslant n-1$, such that
$$
a_{i+1}>a_{i}+2 \text {. }
$$

Otherwise, take $a_{i}^{\prime}=a_{i}+1, a_{i+1}^{\prime}=a_{i+1}-1$, and the rest $a_{k}^{\prime}=a_{k}$. Then
$$
\begin{array}{l}
a_{i}a_{i} a_{i+1}+1 . \\
\end{array}
$$

a contradiction.
(4) There does not exist $1 \leqslant i \leqslant n-1$, such that
$$
a_{i+1}=a_{i}+2 \text { and } a_{i} a_{j+1},
\end{array}
$$

a contradiction.
From (3) and (4), we know
$$
M=\{a, a+1, \cdots, a+n\}-B,
$$

where, $B=\varnothing$ or $\{b\}, b=a+k, 1 \leqslant k \leqslant n-1$.
$$
\begin{array}{l}
\text { Then } \frac{(a+n)(a+n-1)}{2} \\
6, \text { so, when } M=\{2,3,4,5,7,8, \\
\cdots, 63\}, \prod_{i=1}^{n} a_{i} \text { takes the maximum value } \frac{63!}{6}.
$$