solve the pow(x,n) problem.