【Example 1】In the expansion of $\left(a_{1}+a_{2}+\cdots+a_{n}\right)^{k}$, how many different types of terms are there?
In the expansion, each term has the form $a_{1}^{m_{1}} a_{2}^{m_{2}} \cdots a_{n}^{m_{n}}$, where $m_{1}, m_{2}, \cdots, m_{n}$ are non-negative integers, and $m_{1}+m_{2}+\cdots+m_{n}=k$. Conversely, for each set of non-negative integers $m_{1}, m_{2}, \cdots, m_{n}$ that satisfy $m_{1}+m_{2}+\cdots+m_{n}=k$, $a_{1}^{m_{1}} a_{2}^{m_{2}} \cdots a_{n}^{m_{n}}$ is a term in the expansion. Therefore, the number of ways to decompose $k$ into the sum of non-negative integers $m_{1}, m_{2}, \cdots, m_{n}$ is equal to the number of different terms in the expansion. This is equivalent to the number of ways to place $k$ identical balls into $n$ different boxes with no capacity limit, which is $C_{k+n-1}^{k}$.