1. In a math test, $N<40$ people participate. The passing score is set at 65. The test results are as follows: the average score of all participants is 66, that of the promoted is 71, and that of the failed is 56. However, due to an error in the formulation of a question, all scores are increased by 5. At this point, the average score of the promoted becomes 75 and that of the non-promoted 59.

(a) Find all possible values of $N$.

(b) Find all possible values of $N$ in the case where, after the increase, the average score of the promoted became 79 and that of the non-promoted 47.
Solution: (a) Let $P_{1}$ be the number of students who passed before the score increase, and $P_{2}$ be the number of students who passed after the score increase. From the information we have, we can write:

$$
66 N=71 P_{1}+56\left(N-P_{1}\right), \quad 71 N=75 P_{2}+59\left(N-P_{2}\right)
$$

From the first relation, solving the equations, we get $10 N=15 P_{1}$ or $2 N=3 P_{1}$, from which, since $N$ and $P_{1}$ are integers, we can conclude that $N$ is a multiple of 3. Similarly, from the second relation, we have $12 N=16 P_{2}$ or $3 N=4 P_{2}$, and thus $N$ is a multiple of 4. In conclusion, $N$ must be a multiple of 3 and 4, i.e., of 12, and can therefore be 12, 24, or 36. These three cases are indeed possible. Let's look for an example with $N=12$, trying to have scores as equal as possible. If 8 people, i.e., those who were immediately passing, had a score of 71 before the increase, one person got 62, and the remaining three got 54, we have verified all the assumptions of the problem. The cases $N=24$ and $N=36$ are analogous, respectively doubling and tripling the number of people in each score range.

(b) No $N$ can satisfy the conditions of this point. Let $M_{p}$ be the average score - before the increase - of those who were not passing before the increase but would pass after. Then we would have:

$$
76 P_{1}+\left(M_{p}+5\right)\left(P_{2}-P_{1}\right)=79 P_{2}
$$

But $M_{p}<65$, so $M_{p}+5<70<76$, from which

$$
79 P_{2}=76 P_{1}+\left(M_{p}+5\right)\left(P_{2}-P_{1}\right)<76 P_{1}+76\left(P_{2}-P_{1}\right)=76 P_{2}<79 P_{2}
$$

which is a contradiction.