Chef and string challenge

Guys please help me…I am a beginner at codechef.
This code works perfect when I run this,but it shows an error when I submit it.
error is “wrong answer”.
Problem::: https://www.codechef.com/problems/RECNDSTR

Solution::: https://www.codechef.com/viewsolution/32370819

i don’t understand,what are you trying to say.

It if works “perfect”, you wouldn’t get a WA : )

Here’s how i did it, LS/RS the string. assume it as V.
Now check if LS of V is same as RS of V.