Home > Number theory, Olympiad > IMC 2013 Problem 7

## IMC 2013 Problem 7

Problem 7. Let ${p}$ and ${q}$ be relatively prime positive integers. Prove that

$\displaystyle \sum_{k=0}^{pq-1} (-1)^{\lfloor \frac{k}{p}\rfloor +\lfloor \frac{k}{q} \rfloor}=\begin{cases} 0 & \text{if }pq \text{ is even}\\ 1 & \text{if } pq \text{ is odd} \end{cases}$