The task is to generate the correct answer for a given math problem.

Let me give you an example: a multiple choice test consists of 4 questions, and each question has 5 answer choices. in how many r ways can the test be completed if every question is unanswered ?
The answer to this example can be: 625
Here is why: Total r of 5 * 5 * 5 * 5 = 5 ^ 4 = 625 ways to answer all of them. Therefore, the answer is 625.

OK. solve this:
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 ?
Answer:
20 days