For a prime number $p(p \geqslant 3)$, define $F(p)=$ $\sum_{k=1}^{p-1} k^{r}$, where $r$ is a positive odd number not exceeding $p$; $f(p)=$ $\frac{1}{2}-\left\{\frac{F(p)}{p^{2}}\right\}$, where $\{x\}=x-[x]$ represents the fractional part of $x$. Find the value of $f(p)$.
Prove: When $p<r<2 p-1$, set
$$
r-1=(p-1)+r_{1} \text {, }
$$

then $1 \leqslant r_{1} \leqslant p-2$.
By Fermat's Little Theorem, $S_{r-1} \equiv S_{r_{1}}=0(\bmod p)$.
Therefore, $2 F(p) \equiv 0\left(\bmod p^{2}\right)$.
Since $(2, p)=1$, when $1<r<2 p-1$, $F(p) \equiv 0\left(\bmod p^{2}\right)$.
When $r=2 p-1$, by Fermat's Little Theorem, $S_{r-1} \equiv-1(\bmod p)$.
Thus, $2 F(p)=-(2 p-1) p\left(\bmod p^{2}\right)$, i.e., $2 F(p) \equiv p(p+1)\left(\bmod p^{2}\right)$.
Therefore, $F(p) \equiv \frac{p(p+1)}{2}\left(\bmod p^{2}\right)$.
From the above discussion, we get
$$
f(p)=\left\{\begin{array}{ll}
\frac{1}{2 p}, & r=1 ; \\
\frac{1}{2}, & 1<r<2 p-1,2 \chi_{r} ; \\
-\frac{1}{2 p}, & r=2 p-1 .
\end{array}\right.
$$