5. At the Scuola Normale, this year's enrollees in the Science class are of four types: Mathematicians, Physicists, Chemists, and Biologists. At the cafeteria, they all sit together around a round table; each of them has exactly one person sitting opposite them, and moreover, for each student, the set consisting of themselves, their right neighbor, their left neighbor, and the student sitting opposite includes all four types of students. How many enrollees can there be in the Science class, properly divided among the four types, knowing that they are between 30 and 50 (inclusive)? Provide as the result the sum of all possible answers.
(A) 40
(B) 80
(C) 120
(D) 200
(E) 440
5. The answer is (B). Let $m$ be the number of Mathematicians and $n$ be the total number of students.

If for each student we consider the group consisting of this student, their right neighbor, their left neighbor, and the person opposite them, we have $n$ groups, each of which contains exactly one Mathematician. On the other hand, each Mathematics student appears in exactly 4 of these groups (those corresponding to themselves, each of the two neighbors, and the student sitting opposite), hence $n=4 m$.

Now consider four people sitting next to each other in a counterclockwise direction, which we call $a_{1}, a_{2}, a_{3}, a_{4}$. Without loss of generality, we can say that the first three are in the order of groups $F, M$, and $C$. The person $a_{4}$, however, could be $F \circ B$ : we will now show that it must be the second case.

Let $b_{i}$ be the person sitting opposite $a_{i}$. Then $b_{2}$ must be $B$. If we consider $b_{3}$, who sits next to $b_{2}$ in a counterclockwise direction, it cannot be $B$ or $M$ due to the conditions given by $b_{2}$, but it also cannot be $C$, since it sits opposite $a_{3}$, who is $C$. Therefore, $b_{3}$ is $F$ and, similarly, $b_{1}$ is $C$. Now consider $b_{4}$: from the conditions on $b_{3}$, we must exclude $F, C$, and $B$, so it can only be $M$. But then $a_{4}$, who sits opposite $b_{4}$, cannot be $M$ and must be $B$.

Therefore, choosing the type of three people also determines the fourth and, consequently, the rest. However, we need to check that the patterns fit well, as we must respect the condition of who sits opposite.

Number the seats around the table from 0 to $4 m-1$. The person sitting opposite 0 is $2 m$ and, in general, the person sitting opposite $k$ is $2 m+k$. We observe that people whose seats have numbers in the same residue class modulo 4 have the same type of matriculation. Therefore, it is necessary that the residue class modulo 4 of $k$ and $2 m+k$ be different. If $m=2 h$, then $2 m+k=4 h+k \equiv_{4} k$, which is absurd. If instead $m=2 h+1$, then $2 m+k=4 h+2+k \equiv_{4} k+2$. The number of people at the table, therefore, can be a multiple of 4 but not of 8. Between 30 and 50, the numbers with these characteristics are 36 and 44, whose sum gives 80.