A mathematical problem It takes 20 days for a project to be completed by Party A and Party B, 8 days for Party A and 36 days for Party A to complete the rest. If the rest is done by Party B, how many days will it take Please give a detailed algorithm!

A mathematical problem It takes 20 days for a project to be completed by Party A and Party B, 8 days for Party A and 36 days for Party A to complete the rest. If the rest is done by Party B, how many days will it take Please give a detailed algorithm!

1-8/20=3/5
36 / 3 / 5 = 60 a work efficiency 1 / 60
1 / 20-1 / 60 = 1 / 30 B work efficiency 1 / 30
3/5/1/30=18