题目描述
Problem Statement
You are given a string S.
Find the maximum length of a contiguous substring of S that is a palindrome.
Note that there is always a contiguous substring of S that is a palindrome.
Input
The input is given from Standard Input in the following format:
S
Output
Print the answer.
Constraints
- S is a string of length between 2 and 100, inclusive, consisting of uppercase English letters.
Sample Input 1
TOYOTA
Sample Output 1
5
TOYOT, a contiguous substring of TOYOTA, is a palindrome of length 5.
TOYOTA, the only length-6 contiguous substring of TOYOTA, is not a palindrome, so print 5.
Sample Input 2
ABCDEFG
Sample Output 2
1
Every contiguous substring of length 1 is a palindrome.
Sample Input 3
AAAAAAAAAA
Sample Output 3
10
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分
样例输入
TOYOTA
样例输出
5