An empty tank can be filled by two pipes individually in 30 minutes and 60 minutes respectively. There is also a pipe which can empty the full tank in 45 minutes.If all the three pipes are open,how much time does it take to fill the empty tank ?
A. 36 minutes
B. 18 minutes
C. 30 minutes
D. 24 minutes