What I have got:
Let's take $$g(x):=f(x+\pi)-f(x)$$ Now we must show that $\exists m\in\mathbb{R}:g(m)=0$. We see that as $f$ is periodic, $g$ is also a periodic function. Now let's suppose that $\forall x\in\mathbb{R}$ $g(x)\neq 0$. This means that $g(x)$ is strictly positive or negative. Now, because $f$ is periodic and continuous, it has $\max$ and $\min$. Is $f$ is strictly positive and $f(m)$ is $\max$, we get g(x)<0.