Option (B) is correct.
Explanation: The numbers of students that make a full triangle are the triangular numbers. We get them by adding the next counting number each time:
1, 3, 6, 10, 15, 21, 28, 36, 45, 55, …
45 is in this list: 1+2+3+⋯+9=45. So a class of 45 can stand in 9 rows.
Why the other options are wrong
- (A) 9 rows use 45 students and leave 5 over. A 10th row needs 10 students, so 50 is not a triangular number.
- (C) 8 rows use 36 students and leave 4 over. A 9th row needs 9 students, so 40 is not a triangular number.
- (D) 7 rows use 28 students and leave 2 over. An 8th row needs 8 students, so 30 is not a triangular number.