24. Sam writes on a white board the positive integers from 1 to 6 inclusive, once each. She then writes $p$ additional fives and $q$ sevens on the board. The mean of all the numbers on the board is then 5.3.
What is the smallest possible value of $q$ ?
A 7
B 9
C 11
D 13
E 15
24. B The final sum of the numbers on the board is $1+2+3+4+5+6+5 p+7 q=21+5 p+7 q$. As there are now $6+p+q$ numbers on the board, $\frac{21+5 p+7 q}{6+p+q}=5.3$.
Therefore $10(21+5 p+7 q)=53(6+p+q)$, that is $210+50 p+70 q=318+53 p+53 q$.
So $17 q=108+3 p=3(36+p)$. Hence $q$ is a multiple of 3 as 17 and 3 are coprime.
Also, as $p>0,17 q>108$. Therefore $q \geqslant 7$.
So the smallest possible value of $q$ is 9 ; and this does satisfy the conditions with $p=15$.