solve powz(x, n)