Problem 5.8. Each of the 33 bogatyrs (Russian epic heroes) either always lies or always tells the truth. It is known that each bogatyr has exactly one favorite weapon: a sword, spear, axe, or bow.

One day, Ded Chernomor asked each bogatyr four questions:

- Is your favorite weapon a sword?
- Is your favorite weapon a spear?
- Is your favorite weapon an axe?
- Is your favorite weapon a bow?

To the first question, 13 bogatyrs answered affirmatively, to the second question - 15 bogatyrs, to the third - 20 bogatyrs, and to the fourth - 27 bogatyrs.

How many bogatyrs always tell the truth?
Answer: 12.

Solution. Note that each of the truth-telling heroes answers affirmatively to only one question, while each of the lying heroes answers affirmatively to exactly three questions. Let the number of truth-telling heroes be $x$, and the number of lying heroes be $-(33-x)$. Then the total number of affirmative answers was $13+15+20+27=x+3 \cdot(33-x)$, from which we get $75=99-2 x$ and $x=12$. Note also that the number of truth-telling heroes can be exactly 12. Suppose 8 lying heroes love the sword the most, another 6 lying heroes love the spear, another 1 lying hero loves the axe, another 6 lying heroes love the bow, and another 12 truthful heroes love the bow. It is not difficult to verify that all conditions of the problem are satisfied in this case.

## 6th grade