Find all possible values of $$ \lfloor \frac{x - p}{p} \rfloor + \lfloor \frac{-x-1}{p} \rfloor $$where $x$ is a real number and $p$ is a nonzero integer. Here $\lfloor z \rfloor$ denotes the greatest integer less than or equal to $z$.
Source: 1999 Singapore TST 2.2
Tags: floor function, algebra
Find all possible values of $$ \lfloor \frac{x - p}{p} \rfloor + \lfloor \frac{-x-1}{p} \rfloor $$where $x$ is a real number and $p$ is a nonzero integer. Here $\lfloor z \rfloor$ denotes the greatest integer less than or equal to $z$.