A number is called cool if the sum of its digits is multiple of $17$ and the sum of digits of its successor is multiple of $17$. What is the smallest cool number?
2024 Portugal MO
Day 1
Let $ABC$ be a triangle and $D,E$ and $F$ the midpoints of sides $BC, AC$ and $BC$. Medians $AD$ and $BE$ are perpendicular, $AD = 12$ and $BE = 9$. What is the value of $CF$?
A sequence composed by $0$s and $1$s has at most two consecutive $0$s. How many sequences of length $10$ exist?
Day 2
A circle inscribed in the square $ABCD$, with side $10$ cm, intersects sides $BC$ and $AD$ at points $M$ and $N$ respectively. The point $I$ is the intersection of $AM$ with the circle different from $M$, and $P$ is the orthogonal projection of $I$ into $MN$. Find the value of segment $PI$.
In a sport competition, there are teams of two different countries, with $5$ teams in each country. Each team plays against two teams from each country, including the one itself belongs to, one game at home, one away. How many different ways can one choose the matches in this competition?
Alexandre and Bernado are playing the following game. At the beginning, there are $n$ balls in a bag. At first turn, Alexandre can take one ball from the bag; at second turn, Bernado can take one or two balls from the bag, and so on. So they take turns and in $k$ turn, they can take a number of balls from $1$ to $k$. Wins the one who makes the bag empty. For each value of $n$, find who has the winning strategy.