leetcode459 C++ 32ms 重复子串构成的字符串

class Solution {
public:
    bool repeatedSubstringPattern(string s) {
        string ss = s + s;
        string ss_(ss.begin() + 1, ss.end() - 1);
        return (ss_.find(s)<=ss.size());
    }
};

原文地址:https://www.cnblogs.com/theodoric008/p/9373561.html