Detailed Instructions: The task is to generate the correct answer for a given math problem.
Problem:Problem: 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 ?
Solution:
20 days