In an examination 31 candidate passed chemistry,29 passed physics and 3failed both subjects. If 50 candidates Sat for the examination,how many of them passed chemistry only?

If x passed both, then

31+29-x = 50-3
find x, and then 31-x passed chem only