Color the five sides and five diagonals of the convex pentagon $A B C D E$, and satisfy that any two segments sharing a common vertex are of different colors. Find the minimum number of colors needed.
The answer to this question is 5. For a detailed solution, please refer to the 7th issue of "Intermediate Mathematics" in 2010.

After solving this problem, one naturally thinks about what the result would be for a convex $n$-sided polygon. Thus, we arrive at the following generalization.

Generalization: Color the $n$ sides and each diagonal of a convex $n$-sided polygon such that any two segments sharing a common point are of different colors. Find the minimum number of colors required.

Without loss of generality, we can assume that this convex $n$-sided polygon is a regular $n$-sided polygon.
Let's take a regular pentagon as an example to find the solution approach.
Since any two of the five segments $B A, B C, C A, B D, B E$ have a common point, at least five colors are needed.

A coloring method that meets the requirements of the problem for a convex pentagon with the minimum number of colors (equal to 5) can be constructed.
As shown in Figure 1, the same color groups are
\[
\begin{array}{l}
\{A B, C E\}, \\
\{B C, A D\}, \\
\{C D, B E\}, \\
\{D E, A C\}, \\
\{E A, B D\},
\end{array}
\]
and different groups are of different colors.
This is a coloring method with 5 colors.
Analyzing this coloring method, it can be understood as (assuming the colors are $0, 1, 2, 3, 4$)
$A B, C E$ form an angle of $\frac{0 \times 180^{\circ}}{5}$ with $A B$, so $C E, A B$ are colored with color 0;
$B E, C D$ form an angle of $\frac{1 \times 180^{\circ}}{5}$ with $A B$, so $B E, C D$ are colored with color 1;
$B D, A E$ form an angle of $\frac{2 \times 180^{\circ}}{5}$ with $A B$, so $B D, A E$ are colored with color 2;
$B C, A D$ form an angle of $\frac{3 \times 180^{\circ}}{5}$ with $A B$, so $B C, A D$ are colored with color 3;
$D E, A C$ form an angle of $\frac{4 \times 180^{\circ}}{5}$ with $A B$, so $D E, A C$ are colored with color 4.
Below, we use the above approach to solve the generalized problem.
Let $A, B, C$ be three adjacent vertices of a regular $n$-sided polygon, and $B A, B C, C A$ and the $n-3$ diagonals drawn from point $B$, these $n$ segments, any two of which have a common point.
By the problem's requirement, at least $n$ colors are needed.
We can design a coloring method such that using $n$ colors can meet the requirements.
For this, let there be $0, 1, \cdots, n-1$ colors.
Color the sides and diagonals that form an angle of $\frac{k \cdot 180^{\circ}}{n} (k=0,1, \cdots, n-1)$ with the side $A B$ with the $k$-th color, which will meet the requirements.