5. In a country of liars and knights (knights always tell the truth, liars always lie), ten people were given different numbers from 1 to 10. Then each person was asked: "Is your number divisible by 2?". Three people gave an affirmative answer. To the question "Is your number divisible by 4?" six people gave an affirmative answer. To the question "Is your number divisible by 5?" two people gave an affirmative answer. What numbers did the liars receive?
Answer: The liars received the numbers $2,5,6,10$. Solution. Consider the people with numbers $4,5,8$, 10. Only these people could have given different answers to the second and third questions. Four more people answered affirmatively to the second question than to the third. This means that all the people with the specified numbers answered "yes" to the second question and "no" to the third. However, only the knights with numbers 4, 8, and the liars with numbers 5, 10 could change their answer from "yes" to "no". Therefore, numbers 4 and 8 were given to the knights, and numbers 5 and 10 to the liars. Now it is clear that all liars must give an affirmative answer to the second question, and thus there are exactly four liars. At the same time, only the liars with odd numbers answer "yes" to the first question, and there is only one such (5), while there are three liars with even numbers. Therefore, the remaining "undistributed" even numbers 2 and 6 belong to the liars, which completes the solution.