Consider $0=t_0\leq t_1\leq...\leq t_n=1$, $f_0,...,f_{n-1}\in\mathbb{Z}$ and $F:[0,1]\to\mathbb{R}$ be such that
1) $F\equiv f_i$ on the interval $(t_i,t_{t+1})$, for all $i=0,...,n-1$,
2) $\displaystyle \int_0^1 F(t) dt=\sum_{i=0}^{n-1}(t_{i+1}-t_i)f_i=0$.
Does there exist an arbitrarily large prime number $p$ and a positive integer $k=k(p)$ such that $q:=p^k$ satisfies
$\displaystyle \sum_{i=1}^{q-1} F\left(\frac{i}{q}\right)=0$ ?
I know that the answer is YES when all the $t_j$'s are rational number: if $t_j=\frac{p_j}{q_j}$, then it suffices to choose $q\equiv 1$ mod $\mathrm{mcm}(q_1,...,q_{n-1})$.\mathrm{lcm}(q_1,...,q_{n-1})$.
Any idea for the general case?

