Thus, if $z\in\mathbb C$ solves $z^n=1,$ then $z=\zeta_k:=\exp\left(2\pi i\frac{k}{n}\right),$ $k=0,1,\ldots,n-1.$

Vice versa, if $z=\zeta_k,$ then $z^n=\exp\left(i\frac{2k\pi}{n}\right)=1.$

Finally, if $m(n)\equiv k(n)$ are congruent $k(n)\equiv m(n)$ modulo $n,$ then $m=k+ln$ for some $l\in\mathbb Z.$ But then
$$\exp\left(i\frac{2m\pi}{n}\right)=\exp\left(i\frac{2(k+ln\pi}{n}\right)=\exp\left(i\frac{2k\pi}{n}\right)\cdot \exp\left(i 2l\pi\right)=\zeta_k\cdot 1.$$