Problem A
I Repeat Myself I Repeat Myself I Repeat
The Perl programming language has a lot of convenient little
operators. For example, it has an infix operator, x, for creating repeated copies of a string.
When used in an expression like
For this problem, you are going to look for cases where a
long input string consists of a repeated pattern. We say string
Input
Input starts with an integer,
Output
For every test case, print a single output line giving the length of the shortest pattern that explains the given input string.
Sample Input 1 | Sample Output 1 |
---|---|
3 I Repeat Myself I Repeat Myself I Repeat aaaaaaaaaaaaaaaaaaaaa abbcabbcabbabbcabb |
16 1 11 |