leetcode:binary method for pow(x,n) accepted