Open KATO-Hiro opened 1 year ago
s = input().rstrip() n = len(s) ans = 1 for i in range(n + 1): for j in range(i + 1, n + 1): t = s[i:j] if t == t[::-1]: ans = max(ans, len(t))