A group of children organized a tic-tac-toe tournament. Everyone played with everyone else, and a total of 136 games were played. Out of these, exactly 66 games were of the type girl-girl or boy-boy. How many boys and how many girls were in the group?

(Bednářová)
Let's consider a group of $n$ players. Each one plays a match with every other, and we are interested in the total number of matches. Each player will play $\mathrm{s} n-1$ opponents, and there are $n$ players, so in total we have $n \cdot(n-1)$. Now we must realize that we have counted each match twice. Therefore, we have proven that the total number of matches in a group of $n$ players is $\frac{1}{2} n \cdot(n-1)$.

We will create a table from which we can easily determine the solution.

| number of players $n$ | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| number of matches | 1 | 3 | 6 | 10 | 15 | 21 | 28 | 36 | 45 | 55 | 66 | 78 | 91 | 105 | 120 | 136 |

From the table, it is clear that there were a total of 17 children in the group. Now we can easily calculate the solution - it could be 7 boys and 10 girls, or 10 boys and 7 girls.