q, r\in\mathbb{Z},0\leq r\leq n-1