Snake ladders doubt

my code: https://ide.codingblocks.com/s/243471
sir my 1 testcase is failing and giving wrong answer please help