4. (20 points) Several positive numbers are written on the board. The sum of the five largest of them is 0.29 of the sum of all the numbers, and the sum of the five smallest is 0.26 of the sum of all the numbers. How many numbers are written on the board?
Answer: 18.

Solution. Let the total number of numbers be $k+10$. From the condition, it is clear that $k>0$. We can assume that the sum of all numbers is 1 (otherwise, we divide each number by this sum, and the condition of the problem remains). We order the numbers in ascending order:

$$
a_{1} \leqslant a_{2} \leqslant a_{3} \leqslant a_{4} \leqslant a_{5} \leqslant a_{5+1} \ldots \leqslant a_{5+k} \leqslant a_{6+k} \leqslant a_{7+k} \leqslant a_{8+k} \leqslant a_{9+k} \leqslant a_{10+k}
$$

Then

$$
0.26=a_{1}+\ldots+a_{5} \leqslant 5 a_{5} \leqslant 5 a_{6} \Longrightarrow a_{6} \leqslant 0.26 / 5
$$

Moreover,

$$
0.29=a_{k+6}+\ldots+a_{k+10} \geqslant 5 a_{k+6} \geqslant 5 a_{k+5} \Longrightarrow a_{k+5} \geqslant 0.26 / 5
$$

Let $s=a_{6}+\ldots+a_{k+5}$. Note that $s=1-0.26-0.29=0.45$. Therefore,

$$
0.45=s \geqslant k \cdot a_{6} \geqslant \frac{0.26 k}{5}, \quad 0.45=s \leqslant k \cdot a_{k+5} \leqslant \frac{0.29 k}{5}
$$

Thus,

$$
\frac{0.45 \cdot 5}{0.29} \leqslant k \leqslant \frac{0.45 \cdot 5}{0.26} \Longleftrightarrow 7.75<\frac{225}{29} \leqslant k \leqslant \frac{225}{26}<8.65
$$

The only integer $k$ that satisfies this double inequality is 8. Therefore, the total number of numbers written on the board is $8+10=18$.