Finding the digits of the number $789ABC$ Find the digits of the number
$$789ABC$$
where the resulting number is divisible by $7,8$ and $9$. However, A,B, and C cannot be $7,8$ or $9$
Here are some information i found out:
I know $ABC$ have to be divisible by $8$ and I know $7+8+9+A+B+C$ have to equal a multiple of $9$. Now the $7$ is a bit tricky. 
The first number that I test was $ABC=144$ but that is not divisible by $9$
I am looking at multiples that both $8$ and $9$ are divisible by.
However, I noticed trial and error is not so helpful. So i am looking for a strategy or a way someone would solve this problem.
 A: Since $7$, $8$ and $9$ are pairwise coprime, being divisible by all of them is the same as being divisible by their product, which is $504$. So we're looking for a number between $789,000$ and $789,999$ that is divisible by $504$.
One solution will be $504\cdot\left\lfloor\frac{789,999}{504}\right\rfloor = 789,768$, but that doesn't satisfy the condition of not containing the digits 789.
The only other solution is then $789,768-504 = 789,264$, which satisfies all of the conditions.
A: Here is a nice way: we can look for a number divisible by $7 \times 8 \times 9 = 504$ in this range. Then we'll have:
$$789\mathrm{ABC} / 504 = x$$
If we first find the range $x$ is in, we can then try integer values of $x$ inside that range and calculate $504x$. To get such a range, we perform long division on the lowest and highest possible numbers of the form $789\mathrm{ABC}$. We get:
$$789000 / 504 = 1565.47619048$$
$$789999 / 504 = 1567.45833333$$
The only integral $x$ values in this range are $\{1566, 1567\}$! If we pick $1566$, the original number would have been $504 \times 1566 = \color{red}{789264}$, a valid solution. (If we pick $1567$, a $7$ shows up in our answer, which is invalid according to the problem statement.)
