题目描述
blablabla
样例
blablabla
class Solution(object):
def Power(self, base, exponent):
"""
:type base: float
:type exponent: int
:rtype: float
"""
if base == 0:
return
if exponent == 0:
return 1
if exponent < 0:
return 1 / base * self.Power(base, exponent + 1)
if exponent > 0:
return base * self.Power(base, exponent - 1)