question in april challenge

I am getting TLE for my submission to the problem CHEF and DIGITS in April Challenge 2014.
I submitted the code many times with necessary changes but it is showing TLE in every case.
PLEASE solve my problem.

No hints during the live contest, please read the guidelines.

1 Like
//