[SRM474] PalindromesCount by Kaiyang Lv