Kth Root 2 testcases failing

Here is my code link-https://ide.codingblocks.com/s/72463

made a few changes you can refer this code:
https://ide.codingblocks.com/s/72472

ok let me check , I will try running it once more