p and q can complete a work in 40 days and 24 days respectively . p alone started the work and q joined him after 8 days till the completion of the work . how long did the work last ?
"explanation : work done by p in 1 day = 1 / 40 work done by q in 1 day = 1 / 24 work done by p in 8 days = 8 ã — ( 1 / 40 ) = 1 / 5 remaining work = 1 â € “ 1 / 5 = 4 / 5 work done by p and q in 1 day = 1 / 40 + 1 / 24 = 1 / 15 number of days p and q take to complete the remaining work = ( 4 / 5 ) / ( 1 / 15 ) = 12 total days = 8 + 12 = 20 answer : option d"
add(8, divide(subtract(const_1, divide(8, 40)), add(inverse(40), inverse(24))))