This challenge concerns strings such as:
"repeatedrepeatedrepeated"
... that are obtained by repeating a smaller string, which in this case is the string "repeated".
On a related note, since the string above is made of 3 repetitions, one way to produce this string is via the code 3 * "repeated".
Write a function that, given a string, either:
False if the string isn't made by repeating a smaller string or ...is_repeated("repeatedrepeatedrepeated") ➞ 3
is_repeated("overintellectualizations") ➞ False
is_repeated("nononononononononononono") ➞ 12
is_repeated("moremoremoremoremoremore") ➞ 6
is_repeated(",,,,,,,,,,,,,,,,,,,,,,,,") ➞ 24
To keep things a little simpler, all strings in the tests will have length exactly 24, just as in all the examples above. In particular, the answers will always be divisors of 24.