2. In a math competition, 3 problems are proposed, each of which is scored with an integer between 0 and 7 (inclusive). It is known that, no matter which two participants are chosen, there is at most one problem on which these two have obtained the same score (for example, there are no two participants whose scores on the three problems are 7, 1, 2 for the first and 7, 5, 2 for the second, but there could be two participants whose scores are 7, 1, 2 and 7, 2, 1). What is the maximum number of participants in the competition?
SOLUTION: The answer is 64. Let $p_{1}, p_{2}, p_{3}$ be the scores a contestant can obtain on problems $1, 2, 3$, respectively. First, we observe that the number of contestants cannot exceed 64. Indeed, considering only the first two problems, the possible pairs of scores $\left(p_{1}, p_{2}\right)$ relative to these two problems are $8^{2}=64$, and therefore, if different contestants must correspond to different pairs, the number of contestants cannot exceed 64.

Secondly, however, with 64 contestants, the desired result can be achieved. Imagine, for instance, that the 64 contestants obtain, on the first two problems, all 64 possible pairs $\left(p_{1}, p_{2}\right)$ of scores. It is certainly possible, given that the scores range from 0 to 7, that all contestants can achieve a total score (i.e., the sum of scores $p_{1}+p_{2}+p_{3}$) divisible by 8. In this case, there are no two contestants who have the same score in two different problems. Indeed, if two contestants have, for example, the same scores in problem 1 and problem 3, then, by difference, they must also have the same score in problem 2, contradicting the assumption made. An analogous argument applies to the case where two contestants have the same score in problem 2 and problem 3.

SECOND SOLUTION: The first part of this solution coincides with that of the previous solution. For the second part, we show that 64 contestants can satisfy the required condition. We already know that, on the first two problems, our 64 contestants must obtain all 64 possible combinations of scores. We can therefore construct an $8 \times 8$ table where the rows correspond to the scores of the first problem, and the columns correspond to the scores of the second. Each cell in the table will correspond to one of the contestants, and in that cell, we want to write the score that he obtains on the third problem. The requirement of the problem then becomes that no row and no column contain two identical numbers. The following table, for example, satisfies this requirement.

|  | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- |
| 0 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 1 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 0 |
| 2 | 2 | 3 | 4 | 5 | 6 | 7 | 0 | 1 |
| 3 | 3 | 4 | 5 | 6 | 7 | 0 | 1 | 2 |
| 4 | 4 | 5 | 6 | 7 | 0 | 1 | 2 | 3 |
| 5 | 5 | 6 | 7 | 0 | 1 | 2 | 3 | 4 |
| 6 | 6 | 7 | 0 | 1 | 2 | 3 | 4 | 5 |
| 7 | 7 | 0 | 1 | 2 | 3 | 4 | 5 | 6 |