Https://www.codechef.com/viewsolution/38744811

https://www.codechef.com/viewsolution/38744811
Im gettingI wrong answer for the faded palindrome question. Please help me out.