TEMPLELA :: WRONG ANSWER

What’s wrong in my code
https://www.codechef.com/viewsolution/19000611