A and B together finish a job in 12 days. B alone takes 30 days. How long does A take alone?
20 days. A's daily work = together minus B = 1/12 - 1/30 = (5 - 2)/60 = 3/60 = 1/20. With total work 60 units: together 5 units a day, B 2, so A does 3 units a day and needs 60/3 = 20 days.
Explain it simply
Think of the job as a fixed number of units, like 60 pages of a project report. Together A and B type 5 pages a day; B alone types 2. Whatever is left (3 pages a day) is A's speed. You subtract rates, never days.
Example
Question: A + B finish in 12 days, B alone in 30 days. A alone?
LCM method:
- Total work = LCM(12, 30) = 60 units.
- A + B = 60 / 12 = 5 units/day. B = 60 / 30 = 2 units/day.
- A = 5 - 2 = 3 units/day.
- A alone = 60 / 3 = 20 days.
Fraction method: 1/12 - 1/30 = 5/60 - 2/60 = 3/60 = 1/20, so 20 days.
Check: 1/20 + 1/30 = 3/60 + 2/60 = 5/60 = 1/12.
console.log(60 / (60 / 12 - 60 / 30)); // Output: 20A three-person version: A + B take 10 days, B + C 12 days, C + A 15 days. With 60 units, the pair rates are 6, 5 and 4, so 2(A + B + C) = 15 and all three together do 7.5 a day, taking 8 days.
What to say in the interview
"I convert to rates. With 60 units, the pair does 5 a day and B does 2, so A does 3 a day and needs 20 days. I never subtract the days themselves."
Common mistakes
- Answering 30 - 12 = 18 days.
- Forgetting to halve the sum in the three-pairs version.