## Task 1 - 160721

After the coming-of-age ceremony, all students in a class had their individual photos taken. Each student had enough prints made of their photo, and then each student in this class exchanged their photo with each of their classmates.

How many students in this class exchanged photos with each other if exactly 812 photographs changed hands?
If the number of students in the class is denoted by $x$, then each student received $(x-1)$ photographs. A natural number $x>1$ meets the conditions of the problem if and only if $x(x-1)=812$ holds for it.

Now, $x$ and $x-1$ are consecutive natural numbers. Since $812=2 \cdot 2 \cdot 7 \cdot 29$, 812 can only be factored into a product of two natural numbers in the following ways:

$$
812=1 \cdot 812=2 \cdot 406=4 \cdot 203=7 \cdot 116=14 \cdot 58=28 \cdot 29
$$

Among these, only in the case of $28 \cdot 29$ are the two factors consecutive natural numbers. Therefore, $x=29$. Thus, 29 students in the mentioned class exchanged their photos.