Back to Practice
#0042
Combined Work Rate
EasyAptitude10 min10 XP
Problem
A can finish a job in 12 days. B can finish the same job in 18 days. How many days will they take working together?
Why This Matters
Most time-and-work questions become simple once you stop thinking in days and start thinking in work per day.
Examples
Example 1
InputA = 12 days, B = 18 days
Output7.2 days
A does 1/12 per day and B does 1/18 per day. Together they do 5/36 per day, so time is 36/5 = 7.2 days.
Constraints
- Assume both work at constant rates.
- The whole job is 1 unit of work.
CodeReasoning
A can finish a job in 12 days. B can finish the same job in 18 days. How many days will they take working together?
Visible browser tests run here when available.
Testcases1 visible / 3 hidden categories
Classic two-worker problem
Input12 days and 18 days
Expected7.2 days
Combined rate is 1/12 + 1/18.
Hidden Test Categories
Same speed workersOne worker much fasterThree-worker extension