Divide and conquer+Math--pow(x, n)--4conditions+tempVariable->O(logn)