Exercise 7. On a circle, 2012 numbers are written. Each of them is either 1 or -1. Let $S$ be their sum. Suppose there do not exist 10 consecutive numbers on the circle such that their sum is 0. What values can $S$ take under this condition?
Solution to Exercise 7: The sum of 10 consecutive numbers can be $10, 8, 6, 4, 2, 0, -2, -4, -6, -8, -10$. Between two successive packets, which have nine elements in common, the difference in the sum is either 0 (if the last element is the same in each) or 2 (if the last element differs). Thus, if we have a strictly positive sum of ten numbers, and a strictly negative one, moving from one to the other step by step on the circle, we add or subtract 2 each time. Since the sums are even integers, and we change the sign, we must necessarily pass through 0, which is a contradiction. Therefore, all sums of 10 consecutive numbers have the same sign.

If they are all positive, they are at least 2. In 10 consecutive numbers, there are therefore at least six 1s, so there are two consecutive 1s. Let's take two consecutive 1s on the circle. By considering the 201 disjoint consecutive sums formed by the other 2010 numbers, we see that $S \geqslant 402 + 2 = 404$. We can find a configuration where $S = 404$: we place six 1s followed by four -1s, then again six 1s and four -1s, until we have 2010 numbers. Then we add two 1s to conclude. The total sum is $6 \times 201 - 4 \times 201 + 2 = 404$, and we cannot have more than four -1s in ten consecutive numbers, so all sums of ten such numbers are strictly positive. By changing each -1 to 1 one by one, $S$ takes on all even values between 404 and 2012 (without decreasing the sums of ten consecutive integers). Thus, we can achieve any even sum between 404 and 2012, inclusive, and that's all ($S$ is 2012 minus twice the number of -1s, so $S$ is even and bounded by 2012).

Similarly, the achievable negative sums are the even integers between -404 and -2012.