```
class Solution(object):
def repeatedSubstringPattern(self, s):
return any(s[:i] * (len(s) / i) == s for i in range(1, len(s)) if len(s) % i == 0)
```

Time complexity is O(n^{1.5}) because I do for O(n^{0.5}) times (number of divisors of n) an O(n) operation, i.e., `s[:i] * (len(s) / d) == s`

. Space complexity is O(n).