31. Around a round table, 300 people are sitting: some of them are knights, and the rest are liars. Anton asked each of them: "How many liars are among your neighbors?" and added up the numbers he received. Then Anya did the same. When answering the question, knights always tell the truth, while liars always lie, but they only say the numbers 0, 1, or 2. It turned out that the sum of the numbers Anton received is 400 more than the sum Anya received. How many liars are there at the table? Find all possible answers and prove that there are no others.

(A. Chukhnov)
31. Answer: there are 200 liars at the table.

It is clear that the knights gave two identical answers, so the difference between the sums of Anton and Anya could have arisen because some liars gave Anton and Anya different answers. At the same time, the answers of any liar differ by only 1 or 2. The total difference of 400 could have accumulated only if there were no fewer than 200 liars.

Let's divide all the people sitting at the table into groups of consecutive knights and groups of consecutive liars. We will give a banana to each liar who gave Anya an answer one less than Anton, and two bananas to liars who gave Anya an answer two less than Anton. Liars who did not change or even increased their answers will be left without bananas. The total reduction in all answers is at least 400 (it can be strictly greater if some liars increased their answers), so all the participants received no less than 400 bananas.

Note that two bananas could only be received by liars at the edges of their groups. Indeed, such a liar must have answered "two" to Anton and "zero" to Anya, and both answers must be false; therefore, this liar is actually adjacent to exactly one liar and one knight. We will ask each liar who has two bananas to give one of their bananas to the adjacent knight. After this, all 300 liars sitting at the table will have no more than one banana, and the knights will have no more than two. Since there are no fewer than 400 bananas, the number of knights must be no less than 100. Then the number of liars is no more than 200. But we have already established at the beginning that there must be no fewer than 200 liars. Therefore, there are exactly 200 liars at the table.