Why my solution beats only 5%?
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 {\npublic:\n    int getMaxRepetitions(string s1, int n1, string s2, int n2) {\n        int l1 = s1.size(), l2 = s2.size();\n        // nStr s1 contains nPattern s2\n        int i = 0, j = 0;\n        while(i < l1 * n1) {\n            if(s2[j % l2] == s1[i % l1]) j++;\n            i++;\n            if(j % l2 == 0 && i % l1 == 0) break;\n        }\n        int nStr = i / l1;\n        int nPattern = j / l2;\n        // nStr * n2 = nPattern * n1 * m\n        return (long long)n1 * (long long)nPattern / nStr / n2;\n    }\n};\n```
['C++']