digjump problem

Hi,
I’ve done the digjump problem and my code is working on given testcases but when I submitted the code it says wrong answer.I’m not getting why it is.Please help.

Thanks

plz don’t discuss the question of ongoing contest …