Let $x \in \mathbb{R} \backslash \mathbb{Q}, x>0$ and $q \in \mathbb{N}, q>0$, prove that there is an $r \in \mathbb{N}, r>0$ with: $r \cdot x - \left\lfloor r \cdot x \right\rfloor < \frac{1}{q}$ or $1-(r \cdot x - \left\lfloor r \cdot x \right\rfloor) < \frac{1}{q}.$
I was given the hint to divide the sequence $a_r := r \cdot x - \left\lfloor r \cdot x \right\rfloor \in [0,1)$ into q intervals $[0,\frac{1}{q}),[\frac{1}{q},\frac{2}{q}),\ldots,[\frac{q-1}{q},1)$ and use the pigeonhole principle, but I cannot see how this would help to the problem.