13. (2002 National High School Mathematics Competition) Given that $f(x)$ is a function defined on $\mathbf{R}$, $f(1)=1$, and for any $x \in \mathbf{R}$, we have $f(x+5) \geqslant f(x)+5$ and $f(x+1) \leqslant f(x)+1$. If $g(x)=f(x)+1-x$, find the value of $g(2002)$.
13. From $g(x)=f(x)+1-x$ we get $f(x)=g(x)+x-1$.

Then $g(x+5)+(x+5)-1 \geqslant g(x)+(x-1)+5, g(x+1)+(x+1)-1 \leqslant g(x)+(x-1)+1$.
Thus $g(x+5) \geqslant g(x), g(x+1) \leqslant g(x)$.
Therefore $g(x) \leqslant g(x+5) \leqslant g(x+4) \leqslant g(x+3) \leqslant g(x+2) \leqslant g(x+1) \leqslant g(x)$.
So $g(x+1)=g(x)$, hence $g(x)$ is a periodic function with a period of 1, and since $g(1)=1$, we have $g(2002)=1$.
Analysis: This problem appears to be about finding a function value, but the key is to deduce from the given conditions that $g(x)$ is a periodic function with a period of 1, which leads to the solution.