Need help CAKEDOOM

link to question CAKEDOOM Problem - CodeChef

my solution CodeChef: Practical coding for everyone

please tell me why my solution is wrong