$f$ is continuous on $[0,1]$, $f(0)=f(1)$,$n\in \mathbb N$ constant $\Rightarrow$ There exists $x\in[0,1-\frac{1}{n}]$ : $f(x+\frac{1}{n})=f(x).$
If $f$ is continuous, then there exists $x+\frac{1}{n}\in[0,1]$ and $f\left(x+\frac{1}{n}\right)=f(x)$