2014 Canadian MO Problems/Problem 5


Fix positive integers $n$ and $k\ge 2$. A list of n integers is written in a row on a blackboard. You can choose a contiguous block of integers, and I will either add $1$ to all of them or subtract $1$ from all of them. You can repeat this step as often as you like, possibly adapting your selections based on what I do. Prove that after a finite number of steps, you can reach a state where at least $n-k+2$ of the numbers on the blackboard are all simultaneously divisible by $k$.


This problem needs a solution. If you have a solution for it, please help us out by adding it.