The side lengths of a nonagon are consecutive integers.
The perimeter is 2016.
What is the length of the longest side?
The answer is 228.
CONTEXT: I did the UK Junior Kangaroo Challenge in 2016 and was given a keychain with this question on it. I recently found it and solved it pretty quickly but not with a particularly elegant method. I am posting this as I am interested to see how others would solve it.
Let the shortest side be $a$ units. Then the side lengths are $a$, $a+1$, ..., $a+8$.
Their sum is $9a+(1+2+3+...+8)=9a+36$
So $9a+36=2016$. Subtract $36$ and divide by $9$ to get $a=220$ as the shortest side.
Then the longest side is $220+8=228$.