#C4422. Repeated Substring Pattern

    ID: 47959 Type: Default 1000ms 256MiB

Repeated Substring Pattern

Repeated Substring Pattern

Given a string s, determine if it can be constructed by taking one of its substrings and appending multiple copies of that substring together.

For example, the string "abab" can be formed by repeating "ab", so the answer is True, whereas "aba" cannot and the answer is False.

Constraints: \(1 \leq |s| \leq 10^4\).

inputFormat

The input consists of a single line containing the string s.

outputFormat

Output a single line: True if the string can be constructed by repeating a substring, otherwise False.

## sample
abab
True