TITLE: Given $n$ points, the difference of $2$ of them is $1/n$ close to an integer
QUESTION [9 upvotes]: From today's ENS Ulm Math D exam

Let $x_1,\ldots,x_n$ be real numbers
Prove there exists $i\neq j $ and $h\in \mathbb Z$ such that $|x_i-x_j-h|\leq \frac{1}{n}$

I tried contradiction and pigeonhole principle for 45 minutes, to no avail.

REPLY [4 votes]: Using (Like) pigeonhole principle
Let's assume that every $x_i=\epsilon_i+h_i$ with $h_i \in \Bbb Z$ and $\epsilon_i\in [0,1]$ and assume that (we can alawys find an increasing order for $\epsilon_i$):
$$0\leq \epsilon_1\leq \epsilon_2\leq \cdots \leq \epsilon _n<1$$ 
if for every $i$ we have $\epsilon_{i+1}-\epsilon_i>\frac{1}{n}$ take $(i,j)=(1,n)$

One can also see the problem in another direction, take $t_i=\epsilon_{i+1}-\epsilon_i$ for $i\leq n-1$ and $t_{n+1}=1-\epsilon_n+\epsilon_1$ we have for all $t_i\geq 0$ and: $$ t_1+\cdots+t_n=1$$ hence there exists $i$ such that $t_i\leq \frac{1}{n}$