Skip to content

Commit 3a414d5

Browse files
authored
Update 50.pow-x-n.md
1 parent 328dc2d commit 3a414d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

problems/50.pow-x-n.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ class Solution:
136136
return x
137137
if n < 0:
138138
return 1 / self.myPow(x, -n)
139-
return self.myPow(x * x, n // 2) if n % 2 == 0 else x * self.myPow(x * x, (n - 1) // 2)
139+
return self.myPow(x * x, n // 2) if n % 2 == 0 else x * self.myPow(x, n - 1)
140140
```
141141

142142
CPP Code:

0 commit comments

Comments
 (0)