Help-ANUMLA

Can someone help me by pointing out where my solution goes wrong for https://www.codechef.com/problems/ANUMLA problem ?

My solution: https://www.codechef.com/viewsolution/27982104