4. A university student has passed a certain number of exams, with an average of 23. After passing another exam, their average drops to 22.25. Knowing that the score of each exam is an integer between 18 and 30 inclusive, what score did the student get on the last exam?
(A) 18
(B) 19
(C) 20
(D) 21
(E) 22.
4. The answer is (C). Let $n$ be the number of exams passed by the student with an average of 23. Let $S$ be the sum of the grades obtained by the student before the last exam, and $x$ be the grade obtained in the last exam. We have:

$$
\left\{\begin{array}{l}
S=23 n \\
S+x=22.25(n+1)
\end{array}\right.
$$

Subtracting the first equation from the second gives $x=22.25-0.75 n$, or $4 x=89-3 n$. It follows that $89-3 n$ is divisible by 4. Since $x$ is an integer greater than or equal to 18 and $n>0$, we also have $72 \leq 89-3 n<89$, from which $n=3$ and $x=20$.