rotation problom: getting W.A.

I.m getting W.A. Plz do help…
problem link: http://www.codechef.com/problems/ROTATION
solution: http://www.codechef.com/viewsolution/4855113

Your logic of problem is i think correct but you have taken wrong character input, you can use “cin” instead.