5. In a graduation photo at a school, 100 people, including students and teachers from two graduating classes of the ninth grade, are to be arranged on steps in a trapezoidal formation with more people in the front rows than in the back rows (with at least 3 rows). It is required that the number of people in each row must be consecutive natural numbers so that each person in the back row can stand in the gap between two people in the front row. How many arrangements satisfy the above requirements? 
(A) 1
(B) 2
(C) 4
(D) 0
5.B.

Let the last row have $k$ people, with a total of $n$ rows. Then, the number of people in each row from back to front are $k, k+1, k+2, \cdots, k+(n-1)$. According to the problem,
$k n+\frac{n(n-1)}{2}=100$, which simplifies to $n[2 k+(n-1)]=200$.
Since $k, n$ are positive integers, and $n \geqslant 3$, it follows that $n<2 k+(n-1)$, and $n$ and $2 k+(n-1)$ have different parities.

Decomposing 200 into prime factors, we find that $n=5$ or $n=8$. When $n=5$, $k=18$; when $n=8$, $k=9$. There are two different solutions.