In a contest, four fruits (an apple, a banana, an orange, and a pear) have been placed in four closed boxes (one fruit per box). People may guess which fruit is in which box. 123 people participate in the contest. When the boxes are opened, it turns out that 43 people have guessed none of the fruits correctly, 39 people have guessed one fruit correctly, and 31 people have guessed two fruits correctly. How many people have guessed three fruits correctly, and how many people have guessed four fruits correctly?
If you guess 3 fruits correctly, it means the fourth fruit is automatically correct! So it is not possible to guess 3 fruits correctly and hence no such scenario. The only scenario left now is guessing all four fruits correctly.
Which means nobody has guessed three fruits correctly and 123-43-39-31 = 10 people have guessed four fruits correctly.