5. Let the first term and common difference of an arithmetic sequence be non-negative integers, the number of terms be no less than 3, and the sum of all terms be $97^{2}$, then the number of such sequences is
A. 2
B. 3
C. 4
D. 5
5. C Let the first term of the arithmetic sequence be $a$, and the common difference be $d$. From the given, we have: $n a + \frac{1}{2} n(n-1) d = 97^{2}$, which simplifies to $[2 a + (n-1) d] n = 2 \times 97^{2}$. Since $a \geqslant 0, d \geqslant 0$, it follows that $2 \times 97^{2} = n(n-1) d + 2 a n \geqslant n(n-1) d$.
(1) If $d > 0$, and since $d$ is an integer, we have $d \geqslant 1$, then $2 \times 97^{2} \geqslant n(n-1)$. Given that $n \geqslant 3$, we get $n = 97$, at this time $(n, d, a) = (97, 1, 49)$ or $(n, d, a) = (97, 2, 1)$;
(2) If $d = 0$, then $a n = 97^{2}$. Given that $n \geqslant 3$, we have $n = 97$ or $97^{2}$, hence $(n, d, a) = (97, 0, 97)$ or $(n, d, a) = (97^{2}, 0, 1)$.
Therefore, there are 4 arithmetic sequences that meet the conditions.