题解 | #最长回文子串#
最长回文子串
https://www.nowcoder.com/practice/12e081cd10ee4794a2bd70c7d68f5507
ipt = input() def len_longestsubpalin(s): for lensub in range(len(s), 0, -1): for i in range(0, len(s) - lensub +1): if s[i:i+lensub] == s[i:i+lensub][::-1]: return lensub print(len_longestsubpalin(ipt))