An engine takes in 200 J of heat, expels 40 J of heat, and does 160 J of work. What is the efficiency of the engine?

A. 40%
B. 60%
C. 80%
D. 20%