We have \lfloor x \rfloor \le x and equal ony of x is integer
so \lfloor \frac{n}{2} \rfloor + \lfloor \frac{n}{3} \rfloor + \lfloor \frac{n}{6} \rfloor \le \frac{n}{2} + \frac{n}{3}+ \frac{n}{6} = n
so \lfloor \frac{n}{2} \rfloor = \frac{n}{2}
\lfloor \frac{n}{3} \rfloor = \frac{n}{3}
\lfloor \frac{n}{6} \rfloor = \frac{n}{6}
the above is so because if any expression above is not true LHS is less that RHS in any of them shall make the sum < n
so \frac{n}{2}, \frac{n}{3} ,\frac{n}{6} all are ntegers of n is a multiple of 2,3 and 6 that is multiple of LCM(2,3,6) that s 6. so n is of the form 6k