Example 2.2.8 Let $S=\{1,2, \cdots, 2005\}, A \subseteq S,|A|=31$, and the sum of all elements in $A$ is a multiple of 5. Find the number of such subsets $A$.


Analysis: Let $\|A\|$ denote the sum of all elements in $A$, and let
$$
F_{k}=\{A ; A \subseteq S,|A|=31,\|A\| \equiv k(\bmod 5)\} \quad(k=0,1,2,3,4).
$$

Directly finding $\left|F_{0}\right|$ is difficult. By proving that $\left|F_{k}\right|=\left|F_{0}\right|(k=1,2,3,4)$ through a one-to-one mapping, we can find $\left|F_{0}\right|$.
Solution: For any $\left\{x_{1}, x_{2}, \cdots, x_{31}\right\}=A \in F_{0}$, we define the mapping $f_{k}$ as follows:
$$
f_{k}(A)=\left\{x_{1}+k, x_{2}+k, \cdots, x_{31}+k\right\} \quad(k=1,2,3,4),
$$

where if $x_{i}+k>2005$, $x_{i}+k$ is replaced by $x_{i}+k-2005$.
Since $31 k \equiv k(\bmod 5)$ and $2005 \equiv 0(\bmod 5)$, it follows that $f_{k}(A) \in F_{k}$. It is easy to see that $f_{k}$ is a one-to-one mapping from $F_{0}$ to $F_{k}$, so $\left|F_{0}\right|=\left|F_{k}\right|(k=1,2,3,4)$.
Furthermore, $F_{0}, F_{1}, F_{2}, F_{3}, F_{4}$ are mutually disjoint, hence $\sum_{k=0}^{4}\left|F_{k}\right|=\left|\bigcup_{k=0}^{4} F_{k}\right|=\mathrm{C}_{2005}^{31}$, so
$$
\left|F_{0}\right|=\frac{1}{5} C_{2005}^{31}.
$$