Finding logic formula for assigning tasks per day

47 Views Asked by At

I have a condition where there are 2 types of tasks for a person.

For 'hard' task, a person can do 4 tasks per day For 'easy' task, a person can do 10 tasks per day.

I need a formula to calculate the total days required to do, say 21 tasks of 'hard' and 15 tasks of 'easy'

I am able to calculate days for individual tasks for given example like

Days for 'hard' - Math.Ceiling(21 / 4) = 6 Days for 'easy' - Math.Ceiling(15 / 10) = 2

How can I calculate it together, like on 6th day, only one task of 'hard', so rest he can do 'easy' task.