a , b and c can do a piece of work in 24 days , 30 days and 40 days respectively . they began the work together but c left 12 days before the completion of the work . in how many days was the work completed ?