The problem is:
It takes Danny 18 hours to complete a job alone, Ian 24 hours alone, and Roy 30 hours alone. If the three people work in the following seqence: Danny => Ian => Roy => Ian => Roy => Danny => Roy => Danny => Ian. Each person works for 1 hour in a session. This schedule repeats every 9 turns until the job is done. At the end, how many hours did Danny, Ian and Roy work when the job is done respectively?
I have only thought of a brute-force approach to this problem, which is rather slow.
Any other way to solve this problem?
Edit: I used some hints given in the comments, below is my work:
Each nine-turn round would give us
$\frac{20+15+12}{360}\times3 = \frac{141}{360}$ of the total work if the whole job is "one"
Then after two rounds of work, we would have $\frac{78}{360}$ of the total work left to be done. Now all three workers have 6 hours of work time.
Now note Danny gets $\frac{20}{360}$ or total work done each turn(per hour), Ian gets $\frac{15}{360}$ and Roy gets $\frac{12}{360}$
Cycle from the start. After three turns(hours) we'd have $\frac{31}{360}$ more. All three workers have 7 hours of work time
Now after the next person Ian we'd have $\frac{16}{360}$ more...
Next is Roy, after him is $\frac{4}{360}$ more.
Lastly, it only takes Danny 4/20 = 0.2 hours to finish off all the work.
So we have it! 8 hours for Ian and Roy while Danny works for $7+0.2 = 7.2$ hours