Arithmetic, Ratios & Percentages

Answer & solution
Official answer: C
Approach: Compare the change in total marks with the change in the average; the number of observations stays fixed.
Let n be the class size and S the originally recorded total. Then S/n=30.8. Replacing 24 by 42 increases the total by 42−24=18, so (S+18)/n=31.4.
Subtract the first equation from the second: 18/n=31.4−30.8=0.6. Consequently n=18/0.6=30, option C.
As a check, the original total would be 30×30.8=924 and the corrected total 942. Dividing 942 by 30 indeed gives 31.4. The correction is positive, so an increased rather than decreased mean is consistent. The other proposed sizes would not make an 18-mark correction produce a 0.6-mark mean increase.