Pipes A and B can fill a tank in 16 hours and 24 hours, respectively, whereas pipe C can empty the full tank in 40 hours. All three pipes are opened together, but pipe A is closed after 10 hours. After how many hours will the remaining part of the tank be filled?
A10
B20
C12 1/2
D15 1/2