Simple.Math.Py
\n# Complexity\n- Time complexity:\nO(log N)\n\n\n# Code\n\nclass Solution:\n    def integerBreak(self, n: int) -> int:\n        if n<=3:return n-1\n        ans
\n# Complexity\n- Time complexity:\n$$O(log N)$$\n\n\n# Code\n```\nclass Solution:\n    def integerBreak(self, n: int) -> int:\n        if n<=3:return n-1\n        ans=n//3\n        rem=n%3\n        if rem==1:\n            return 3**(ans-1)*2*2\n        if rem==2:\n            return 3**(ans)*2\n        return 3**ans\n```
['Python3']