There were 4 cheese pizzas, 4 sausage pizzas, and 4 veggie pizzas with each pizza divided into 6 pieces. The student drew a picture showing the pizzas cut into slices and grouped the slices into sets of 3, since each student gets 3 pieces. By counting the number of groups of 3 slices, the student determined that there were 24 students.