Easy to do without DP
Intuition\n Describe your first thoughts on how to solve this problem. \nI tried to solve the problem usig basic mathematics skills without using DP\n# Approach
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nI tried to solve the problem usig basic mathematics skills without using DP\n# Approach\n<!-- Describe your approach to solving the problem. -->\nJust found a formula to calculate the soluution & it was easy to do so.\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\nThe time complexity is solved in O(n).\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\nThe space complexity is O(1).\n# Code\n```\nclass Solution {\npublic:\n    int integerBreak(int n) {\n        if(n == 2)\n        {\n            return 1;\n        }\n        if(n == 3)\n        {\n            return 2;\n        }\n        int ans = 1;\n        while(n > 4)\n        {\n            ans *= 3;\n            n -= 3;\n        }\n        ans *= n;\n        return ans;\n    }\n};\n```
['Math', 'C++']