Getting wrong answer in one test case using top down approach

CODE LINK

Here I corrected your code https://ide.codingblocks.com/s/286632, please see