1. On an island, there live only knights, who always tell the truth, and liars, who always lie, and there are at least two knights and at least two liars. One fine day, each islander, in turn, pointed to each of the others and said one of two phrases: "You are a knight!" or "You are a liar!" The phrase "You are a liar!" was heard exactly 230 times. How many times was the phrase "You are a knight!" heard?
Answer: 526.

Solution. Let $r$ and $\ell$ denote the number of knights and liars, respectively. Note that a knight will say to another knight and a liar will say to another liar: "You are a knight!", while a knight will say to a liar and a liar will say to a knight: "You are a liar!" Therefore, the number of liar-knight pairs is $\frac{230}{2}=115=r \ell$. Since $r \ell=115=5 \cdot 23$ and $r, \ell \geqslant 2$, either $r=5$ and $\ell=23$, or $r=23$ and $\ell=5$. In either case, the number of knight-knight and liar-liar pairs is $\frac{5 \cdot 4}{2}+\frac{23 \cdot 22}{2}=263$. Therefore, the phrase "You are a knight!" was said 526 times.