| 4 | #Memory: 15.17% |
| 5 | |
| 6 | class Solution: |
| 7 | def myPow(self, x: float, n: int) -> float: |
| 8 | if not n: return 1 |
| 9 | power = self.myPow(x, int(n/2)) |
| 10 | if n % 2 == 0: |
| 11 | return power * power |
| 12 | else: |
| 13 | return power * power / x if n < 0 else power * power * x |
nothing calls this directly
no outgoing calls
no test coverage detected