Problem - 4228
Let $p$ is an odd prime, compute $1^{p-1}+2^{p-1}+3^{p-1}+\cdots+(p-1)^{p-1}\pmod{p}$.
By Fermat's little theorem, we have $$\begin{array}{ll} \therefore\quad &1^{p-1}+2^{p-1}+3^{p-1}+\cdots+(p-1)^{p-1}\\ \equiv& 1+1+1+\cdots + 1\\ \equiv& p-1\\ \equiv& \boxed{-1}\pmod{p} \end{array}$$