What's wrong in my code?

Submission link → CodeChef: Practical coding for everyone
Problem → GALACTIK Problem - CodeChef