Skip to content

Commit e6d63f0

Browse files
committed
Update integer-break.py
1 parent 6548c23 commit e6d63f0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Python/integer-break.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def integerBreak(self, n):
5252
if n % 3 == 0: # n = 3Q + 0, the max is 3^Q * 2^0
5353
res = 3 ** (n // 3)
5454
elif n % 3 == 2: # n = 3Q + 2, the max is 3^Q * 2^1
55-
res = 3 ** (n // 3) * 2
55+
res = 3 ** (n // 3) * 2
5656
else: # n = 3Q + 4, the max is 3^Q * 2^2
5757
res = 3 ** (n // 3 - 1) * 4
5858
return res

0 commit comments

Comments
 (0)