How to find the number of pills which someone has consumed given a time range? The problem is as follows:

Marina went to the doctor and he has advised her to take vitamins. As
  doctor's orders she has to take one tablet of Vitamin C every 6 hours.
  From vitamin D she has to take two pills every 8 hours and from
  vitamin K, three pills every 9 hours. It is known from her diary that
  she took 330 pills in total and began taking the three kinds at the
  same time. During how many hours, the least, did she took the pills?

$\begin{array}{ll}
1.&\textrm{504 hours}\\
2.&\textrm{360 hours}\\
3.&\textrm{432 hours}\\
4.&\textrm{288 hours}\\
\end{array}$ 
I'm not sure exactly how to tackle this problem, can someone help me?. The suggested approach which I was given in class is that the number of doses that a person takes is equal to:
$dose=\frac{\textrm{total time}}{\textrm{time for each or unit time}}+1$
which I think it kind of makes sense, but I don't know how to use that formula and why?. Can someone help me using this approach? The part where I'm confused is exactly how should I understand the word which was given that say the least?. How is this translated in the problem?.
 A: Hint:  Marina takes six pills initially.  After that, she takes $12 \cdot 1 + 9 \cdot 2 + 8 \cdot 3 = 54$ pills every $72$ hours.  
A: The number of pills she takes in $n$ hours is:
$$6 + \left \lceil{\frac{n}{6}}\right \rceil +  2\cdot \left\lceil{\frac{n}{8}}\right \rceil + 3 \cdot \left \lceil{\frac{n}{9}}\right \rceil $$
where $\left \lceil{x} \right\rceil $ is the smallest $n \in \mathbb{N}$ such that $x \leq n$.
This is because at the start, when $n=0$, she takes $6$ pills. Then she takes one every $6$ hours, two every $8$ hours and three every $9$ hours. 
That being said, you want to solve 
$$6 + \left \lceil{\frac{n}{6}}\right \rceil +  2\cdot \left\lceil{\frac{n}{8}}\right \rceil + 3 \cdot \left \lceil{\frac{n}{9}}\right \rceil = 330 $$
If we drop the $\lceil{\;}\rceil$, we have to solve (I multiplied by $12$ to remove fractions)
$$12 \cdot 6 + 2n + 3n + 4n = 12 \cdot 330$$
$$9n = 3888$$
which gives $n=432$. Is this the smallest $n$? Well, let's check:
$$\frac{432}{6} = 72 \; , \; \frac{432}{8} = 54 \; , \; \frac{432}{9} = 48$$
All integers! So if you lower $n$ by one, you lower the values of each $\left \lceil{\frac{n}{x}}\right \rceil$ for $x=6,8,9$, and therefore the expression above is not equal to $330$ anymore.
