## Task $1 / 90$

A couple threw a New Year's Eve party with $n$ guests ( $n \in N, n<100$ ). If each of the attendees had clinked glasses with every other exactly once, the glasses would have rung out exactly $m$ times. ( $m=$ $\left.k^{2}, k \in N\right)$.

How many guests were present?
At the party, there were $n+2$ people present. The number of "toasts" is thus $m=k^{2}=0.5(n+$ $2)(n+1)$. Since $(n+2)$ and $(n+1)$ are coprime, it follows that either $0.5(n+2)$ and $(n+1)$ or $0.5(n+1)$ and $(n+2)$ must be perfect squares if $m$ is to be a perfect square. Therefore, one must check for $1 \leq n<100$ (assuming at least one guest is present)

1. whether the odd perfect squares $(n+2)$ yield a perfect square $0.5(n+1)$ or
2. whether the odd perfect squares $(n+1)$ yield a perfect square $0.5(n+2)$.

A check with $n=7 ; 8 ; 23 ; 24 ; 47 ; 48 ; 79 ; 80$ reveals that two solutions exist:

$n_{1}=7, n_{1}+2=9=3^{2}, 0.5\left(n_{1}+1\right)=4=2^{2}$ and $n_{2}=48, n_{2}+1=49=7^{2}, 0.5\left(n_{2}+2\right)=25=5^{2}$. Therefore, there were either 7 or 48 guests present.