Suppose we have a convex polygon in which all interior angles are integers when measured in degrees, and the interior angles at every two consecutive vertices differ by exactly $1^{\circ}$. If the greatest and least interior angles in the polygon are $M^{\circ}$ and $m^{\circ}$, what is the maximum possible value of $M-m$ ?
The answer is 18 .

To justify this answer, we will find it helpful to discuss the exterior angles rather than the interior angles. Consecutive exterior angles must still be integers and must still differ by $1^{\circ}$, and the value we seek is equal to the difference between the greatest and least exterior angles (since $(180-m)-(180-M)=M-m)$. But by working with the exterior angles, we gain one useful fact: they must add up to $360^{\circ}$.

We can achieve $M-m=18$ by letting the exterior angles in a 36-gon be

$$
1^{\circ}, 2^{\circ}, 3^{\circ}, \ldots, 18^{\circ}, 19^{\circ}, 18^{\circ}, \ldots, 3^{\circ}, 2^{\circ}
$$

in that order. The sum is $360^{\circ}$ (since we have 36 angles whose average is $10^{\circ}$ ), and such a polygon clearly exists (we can construct a convex polygon with prescribed exterior angles $a_{1}, \ldots, a_{n}$ by letting the vertices be $\left(1, a_{1}+\cdots+a_{k}\right)$ in polar coordinates for all $1 \leq k \leq n$ ).

Now we show that we cannot achieve $M-m>18$. We argue by contradiction. Suppose $M-m>18$. Then $M-m \geq 19$ and $M \leq 179$, so $m \leq 160$, and the greatest exterior angle is at least $180^{\circ}-160^{\circ}=20^{\circ}$. An exterior angle $k$ vertices away from the greatest exterior angle must be at least $(180-m-k)^{\circ}$. Two facts follow: first, there must be a vertex at least 19 vertices away from the vertex with the greatest exterior angle, and so there are at least 38 vertices; second, the exterior angles in the polygon add up to at least

$$
1^{\circ}+2^{\circ}+3^{\circ}+\cdots+19^{\circ}+20^{\circ}+19^{\circ}+\cdots+3^{\circ}+2^{\circ} \text {, }
$$

which is $399^{\circ}$. This is a contradiction.

Therefore, the maximum possible value of $M-m$ is 18 .