Find the greatest number of 6 digits exactly divisible by 24,15 and 36 I am solving questions related to number theory. I have encountered this problem in my textbook. 
I asked for the solution of this question from my friend. The solution was like this,
We will find out the LCM of 24,15 and 36 is 360.
Now, greatest 6-digit number is 999999.
Now, We will divide this number by LCM of 24,15 and 36, we will get,
999999/360 will give remainder 279.
So, 999999 – 279 = 999720.
The required number must be 999720.
But i do not understand how this method works?
Can someone explain and clarify the way this solution works?
 A: Let's find the LCM of $24$, $15$, and $36$.
$24 = (2^3)(3^1)(5^0)$
$15 = (2^0)(3^1)(5^1)$
$36 = (2^2)(3^2)(5^0)$
The LCM must have all of these factors.
The LCM is $(2^3)(3^2)(5^1)=360$
So now, we need the biggest six digit multiple of $360$ which is $999720$.

You have done this much.
The reason why this works, is that in order for a number to be divisible by all $3$ of these numbers at the same time, it must have the necessary prime factors.
It must have at least $3$ factors of $2$, to be divisible by $24$.
It must have at least $2$ factors of $3$ , to be divisible by $36$.
It must have at least $1$ factor of $5$, to be divisible by $15$.
Note, that if a number satisfies all $3$ of these constraints, it automatically fits all $6$ other constraints. ($3$ actually because all numbers have $p^0$ as a factor)

Notice, when doing these types of calculations, one can be hasty and approximate the solution, and to do so -- multiply all three numbers together. However, for the purposes of accuracy and flexibility, finding the LCM is highly recommended.
A: It works because among the many solutions (you can calculate there are exactly $2500$ going from $278$ until $2777$) of the double inequation
$$100000\le360x\le999999$$ you want to find the greatest one, in other words you want to find $N$ such that $$360N\le999999\lt360(N+1)\iff N\le\frac{999999}{360}\lt N+1$$ By the algorithm of the division you have
$$\frac{999999}{360}=N+\frac{r}{360}$$ where $r$ is the remainder $279\space (\lt 360)$ you have calculated and the number $999720$ you have calculated too is just $360\cdot2777$.(Why $360(N+1)$ should have more than six digits?).
