0
How many times?
code-golfstring
Inspired by Rotational symmetry of string.
Given a string, return its shortest substring that, when repeated a number of times, will produce the original string, as well as the number itself.
Test cases:
"ABCDABCDABCDABCD" => "ABCD", 4
"AAAAAAAAAA" => "A", 10
...