https://www.codechef.com/problems/MARCHA1

Tried solving the problem as explained by prateek bhaiya, yet getting WA. Kindly review my code and let me know what mistake m I making
https://www.codechef.com/viewsolution/27376704