Solution (source code)

= Solution

For <congruence classes> in $\mathbb Z/N\mathbb Z$, define
$$
\boxed{[a]+[b]=[a+b],\qquad [a][b]=[ab].}
$$
These operations are independent of representatives. If $a'=a+Nr$ and $b'=b+Ns$, then $(a'+b')-(a+b)=N(r+s)$ and $a'b'-ab=N(rb+sa+Nrs)$. Thus changing representatives leaves both results in the same <congruence class>. The usual integer laws descend to make this a <commutative ring> with zero $[0]$ and identity $[1]$.