题目描述
在一个二维数组中(每个一维数组的长度相同),每一行都按照从左到右递增的顺序排序,每一列都按照从上到下 …
read morehttps://leetcode.com/problems/powx-n/
func myPow(x float64, n int) float64 {
if (n == 0) {
return 1.0
}
var half float64 = myPow(x,n/2)
if (n % 2 == 0) {
return half * half
}
if (n > 0) {
return half * half * x
}else {
return half * half / x …