eolymp
bolt
Try our new interface for solving problems
Problems

Period of a string

Period of a string

The string \textbf{s} is given. Find the string \textbf{t} of minimum length such that \textbf{s} can be represented as a concatenation of one or some copies of \textbf{t}. \InputFile One string \textbf{s} (\textbf{1} ≤ |\textbf{s}| ≤ \textbf{5·10^6}) that contains the latin letters only. \OutputFile The length of a string \textbf{t}.
Time limit 1 second
Memory limit 64 MiB
Input example #1
abcabcabc
Output example #1
3