5. The value of the 1000th term in the sequence $1,2,2,3,3,3,4,4,4,4,5,5,5,5,5,6, \cdots$ is ( ).
(A) 42
(B) 45
(C) 48
(D) 51
5. (B).

The key is to determine which number segment $a_{1000}$ falls into. Suppose $a_{1000}$ is in the $k$-th number segment, then $a_{100}=k$. Since the $k$-th number segment contains $k$ numbers, $k$ should satisfy the inequality $\frac{(k-1) k}{2}=1+2+3+\cdots+(k-1)<1000 \leqslant 1+2+3+\cdots+k=\frac{k(k+1)}{2}$, i.e., $k^{2}-k<2000 \leqslant k^{2}+k$. Thus, $k=45$. Therefore, $a_{1000}=45$.