4. A cinema was visited by 50 viewers, the total age of whom is 1555 years, and among them, there are no viewers of the same age. For what largest $k$ can we guarantee to select 16 viewers whose total age is not less than $k$ years?
Answer: 776.

Solution. We will show that $k \geqslant 776$, that is, the total age of the 16 oldest viewers is always not less than 776. Arrange the viewers in order of increasing age, and let $a_{i}$ be the age of the $i$-th viewer. Since there are no viewers of the same age, we get

$$
a_{1} \leqslant a_{2}-1 \leqslant a_{3}-2 \leqslant \ldots \leqslant a_{50}-49
$$

that is, the numbers $b_{i}=a_{i}-(i-1)$ are increasing. Moreover,

$$
b_{1}+b_{2}+\ldots+b_{50}=a_{1}+a_{2}+\ldots+a_{50}-(0+1+2+\ldots+49)=1555-\frac{49 \cdot 50}{2}=330
$$

from which the arithmetic mean of the numbers $b_{k}$ is $\frac{330}{50}=6.6$. Due to the increasing nature of the numbers $b_{i}$, there exists an index $m$ such that $b_{i} \leqslant 6$ for $i \leqslant m$ and $b_{i} \geqslant 7$ for $i>m$. If $m \leqslant 34$, then

$$
b_{35}+b_{36}+\ldots+b_{50} \geqslant 16 \cdot 7=112
$$

and if $m>34$

$$
b_{1}+b_{2}+\ldots+b_{34} \leqslant 34 \cdot 6=204 \quad \text { and } \quad b_{35}+b_{36}+\ldots+b_{50} \geqslant 330-204=126>112
$$

In both cases

$$
a_{35}+a_{36}+\ldots+a_{50}=b_{35}+b_{36}+\ldots+b_{50}+(34+35+\ldots+49) \geqslant 112+\frac{16 \cdot(34+49)}{2}=776
$$

Now we will show that $k \leqslant 776$. We need to provide an example where the total age of the 16 oldest viewers is 776. Suppose people aged $6,7, \ldots, 25$ and $27,28, \ldots, 56$ years came to the cinema. Their total age is $\frac{51 \cdot(6+56)}{2}-26=1555$, and the total age of the 16 oldest of them is $41+42+\ldots+56=\frac{16 \cdot(41+56)}{2}=776$.