18. The number 840 can be written as $\frac{p!}{q!}$, where $p$ and $q$ are positive integers less than 10 .
What is the value of $p+q$ ?
Note that, $n!=1 \times 2 \times 3 \times \cdots \times(n-1) \times n$.
A 8
B 9
C 10
D 12
E 15
Solution
C
We note first that, as $\frac{p!}{q!}=840$, it follows that $p!>q!$ and hence $p>q$. Therefore
$$
\frac{p!}{q!}=\frac{1 \times 2 \times \cdots \times q \times(q+1) \times \cdots \times p}{1 \times 2 \times \cdots \times q}=(q+1) \times(q+2) \times \cdots \times(p-1) \times p \text {. }
$$

Thus $840=\frac{p!}{q!}$ is the product of the consecutive integers $q+1, q+2, \ldots, p-1, p$, where $p \leq 9$. Since 840 is not a multiple of $9, p \neq 9$. Since 840 is a multiple of $7, p \geq 7$.
Now $5 \times 6 \times 7 \times 8=1680>840$, while $6 \times 7 \times 8=336<840$. Hence 840 is not the product of consecutive integers of which the largest is 8 .

We deduce that $p=7$. It is now straightforward to check that
$$
840=4 \times 5 \times 6 \times 7=\frac{7!}{3!} .
$$

Therefore $p=7$ and $q=3$. Hence $p+q=7+3=10$.