Count the palindromic substrings of s (substrings with different positions count separately).
Input: one line, the string s.
Output: the count.
abc
3
a, b, c.
aaa
6
a×3, aa×2, aaa.
Run your code against the sample tests, or Submit to run the full suite.