I come across a question, stating that :
Prove that the decimal representation of $\frac{a}{b}$with coprime $a,b$ has at most period $(b-1).$
Well, it says that we should prove it using the Pigeonhole Principle, but I have no idea on how to use it. Can anyone help? Thanks.
Hint:
Consider the sequence of partial remainders $(r_n)$ in the long division algorithm. We may suppose no remainder is $0$ (it is a trivial case). As the remainders satisfy $1 \le r_n \le (b-1)$, a remainder has to repeat. What happens then?