This is a question of an assignment I am trying to solve but unable to think how to use pigeonhole principle.
Question is Let $S=\{1, 2, \ldots,n\}$ and let $r$ be an integer not belonging to $S$. Let $T=S \cup \{r\}$. Show that there exists an $x \in S$ such that sum of all elements $T\setminus\{x\}$ is divisible by $n$.
Can someone please tell how to solve this problem.
Non-pigeonhole solution: The sum of the elements in $S$ is $n(n+1)/2+r.$ If $n$ is odd, just remove $r$ so that the sum is $n \cdot \frac{n+1}{2},$ which is divisible by $n.$
If $n=2m$ is even, then we require $0 \equiv m(2m+1) + r - x = m+r - x \mod 2m,$ so just choose $x=m+r \mod 2m,$ or $x=2m$ if $m+r\equiv 0 \mod 2m.$
Edit: Check rtybase's comment.