Square Root by binary search

Showing WA for ithird test case
ques link
https://hack.codingblocks.com/practice/p/373/191
my code
https://ide.codingblocks.com/#/s/30107

It should give same answer for 100000007 and 100000008 but it isn’t. So think…