5. Color each vertex of a square pyramid with one color, and make the endpoints of the same edge have different colors. If only 5 colors are available, the total number of different coloring methods is $\qquad$
$5,4,20$.
Suppose, for the pyramid $S-ABCD$, the vertices $S, A, B$ are colored with different colors, and they have a total of $5 \times 4 \times 3=60$ coloring methods.

When $S, A, B$ are already colored, assume their colors are $1, 2, 3$ respectively; if $C$ is colored with color 2, then $D$ can be colored with one of the colors $3, 4, 5$, which gives 3 coloring methods; if $C$ is colored with color 4, then $D$ can be colored with color 3 or 5, which gives 2 coloring methods; if $C$ is colored with color 5, then $D$ can be colored with color 3 or 4, which also gives 2 coloring methods. Therefore, when $S, A, B$ are already colored, $C$ and $D$ have 7 coloring methods.
Thus, the total number of coloring methods is $60 \times 7=420$.