24. Gregor divides 2015 successively by $1,2,3$, and so on up to and including 1000 . He writes down the remainder for each division. What is the largest remainder he writes down?
A 55
B 215
C 671
D 1007
E some other value
24. C Suppose we obtain the remainder $r$ when we divide 2015 by the positive integer $d$. Then $r \leqslant d-1$. Also, with $d \leqslant 1000$ the quotient must be at least 2 . This suggests that to get the largest possible remainder we should aim to write 2015 in the form $2 d+(d-1)$. The equation $2015=2 d+(d-1)$ has the solution $d=672$. So we obtain the remainder 671 when we divide 2015 by 672 . If we divide 2015 by an integer $d_{1}<672$, the remainder will be at most $d_{1}-1$ and so will be less than 671. If we divide 2015 by an integer $d_{2}$, where $672<d_{2} \leqslant 1000$ and obtain remainder $r_{2}$, we would have $r_{2}=2015-2 d_{2}<2015-2 \times 672=671$. Hence 671 is the largest remainder we can obtain.