solve pow(x,n)