Python (Simple Maths)
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution:\n    def getMaxRepetitions(self, s1, n1, s2, n2):\n        dp = []\n\n        for i in range(len(s2)):\n            start, count = i, 0 \n            for j in range(len(s1)):\n                if s1[j] == s2[start]:\n                    start += 1 \n                    if start == len(s2):\n                        start = 0 \n                        count += 1 \n            dp.append((start,count))\n\n        total, idx = 0, 0 \n\n        for _ in range(n1):\n            total += dp[idx][1]\n            idx = dp[idx][0]\n\n        return total//n2 \n```
['Python3']