Given:
Pipe A can fill in 16 hours
Pipe B can fill in 24 hours
Pipe C can empty in 40 hours
Concept used:
If a pipe can fill or empty in A hours, then it can fill or empty 1/A part in 1 hour.
Calculation:
Pipe A can fill 1/16 in 1 hour
Pipe B can fill 1/24 in 1 hour
Pipe C can empty 1/40 in 1 hour
Together they can fill 1/16 + 1/24 – 1/40 part in 1 hour
⇒ Together they can fill 19/240 parts in 1 hour
⇒ Together they can fill 190/240 = 19/24 part in 10 hours
Remaining tank = 1 – 19/24 = 5/24
B and C can do 1/24 – 1/40 = 2/120 = 1/60
B and C can fill a tank in 60 hours
B and C can fill 5/24 tank in 60 × 5/24 = 25/2 = 1221 hours
∴ The remaining tank will be filled in 1221 hours

Alternate Method
Calculation:
LCM of 16, 24, and 40 = 240
Let the total work be 240 units
Efficiency of A = 240/16 = 15 units
Efficiency of B = 240/24 = 10 units
Efficiency of C = 240/40 = 6 units
When all three pipes were opened together for 10 hours,
Work done ⇒ (15 + 10 - 6) × 10 = 190 units
Remaining tank = 240 units - 190 units = 50 units
Now, Pipe A is closed and the remaining tank will be filled by B and C in = 50/(10 - 6) hours.
⇒ 50/4 = 1221 hours.
Hence, the correct answer is 1221 hours.