Solution (source code)

= Solution

Since $\gcd(x,N)=1$, multiplication by $x$ modulo $N$ is a <bijection> of $\mathbb Z_N$, with inverse multiplication by the <modular inverse> $x^{-1}$. Hence $U_x$ permutes the standard orthonormal basis. It preserves all inner products and satisfies
$$
U_x^\dagger=U_{x^{-1}},
\qquad
U_x^\dagger U_x=I,
$$
so $U_x$ is a <unitary operator>.