[LC] Add solution to pow(x, n).