7-8. Grandma and her favorite grandson Vasyutka agreed to show a trick to Mom. Grandma had 10 fillings for pies, and she baked one pie with each pair of these fillings. In total, she baked 45 pies. Only Grandma can determine the filling of a pie by looking at it.

Grandma lays out $n$ of the 45 pies on a plate, and Vasyutka breaks them open to see what fillings they have. Then he tells Mom: “I can definitely determine at least one of the fillings of any of the remaining pies without breaking them open!” Indeed, Mom randomly picks any of the remaining pies, and Vasyutka correctly identifies one of its fillings.

What is the smallest $n$ for which Vasyutka and Grandma can perform such a trick? Answer: 36.
Solution. Let's assume Vasyutka broke less than 36 pies, i.e., there are still 10 or more pies left. Suppose Vasyutka told his mother that the pie she took has the first type of filling. Why could he be wrong? Because among the 10 or more remaining pies, there is a pie without the first type of filling (since there are only 9 pies with the first type of filling), and that is the one his mother could have given him. Similarly, Vasyutka will not always guess the filling if he says it is of the second, third, ..., or tenth type. Therefore, $n \geqslant 36$.

We have just proven that if $n<36$, Vasyutka cannot accurately name any filling in the next pie. But is there a situation when $n=36$ where Vasyutka can still name the filling that will definitely be in the next pie? It turns out, yes! For this, the grandmother, having agreed with Vasyutka in advance, will give him all 36 pies without the first type of filling. Then Vasyutka will understand that all the remaining pies contain the first type of filling, and he will name this filling to his mother.

## 8th grade