#c22302. 最小循环覆盖
最小循环覆盖
Minimum Cyclic Cover (String)
Problem Description
You are given a string , and you need to find the length of the minimum cyclic cover of this string.
is the minimum cyclic cover of if and only if is a prefix of the string obtained by concatenating multiple copies of , and is the shortest string satisfying this condition.
Given a string , output a number: the length of the minimum cyclic cover .
Input Format
One line containing a string .
Output Format
Output one line containing a number: the answer.
Sample Input 1
bcabcabcabcab
Sample Output 1
3
Sample Input 2
aaaaaaa
Sample Output 2
1
Constraints
For all data, , and the string consists of lowercase letters only.