5. Given that $f(x)$ is a function defined on $\mathbf{R}$. If $f(0)=0$, and for any $x \in \mathbf{R}$, it satisfies
$$
\begin{array}{l}
f(x+4)-f(x) \leqslant x^{2}, \\
f(x+16)-f(x) \geqslant 4 x^{2}+48 x+224,
\end{array}
$$

then $f(64)=$ $\qquad$
5. 19840.

Notice that,
$$
\begin{array}{l} 
f(x+4)-f(x) \\
=(f(x+16)-f(x))-(f(x+16)- \\
f(x+12))-(f(x+12)-f(x+8))- \\
(f(x+8)-f(x+4)) \\
\geqslant\left(4 x^{2}+48 x+224\right)-(x+12)^{2}- \\
(x+8)^{2}-(x+4)^{2} \\
= x^{2} .
\end{array}
$$

Since $f(x+4)-f(x) \leqslant x^{2}$, we have,
$$
\begin{array}{l}
f(x+4)-f(x)=x^{2} \\
\Rightarrow f(4 k+4)-f(4 k)=(4 k)^{2} \\
\Rightarrow f(64)=\sum_{k=0}^{15}(f(4(k+1))-f(4 k)) \\
\quad=\sum_{k=0}^{15} 16 k^{2}=19840 .
\end{array}
$$