I got AC by returning X - 1 in case binary search gave me a value such that X*X > Y.It is guaranteed, that for given Y , X will be always an integer.
All about problems in Volume 100. If there is a thread about your problem, please use it. If not, create one with its number in the subject.
Moderator: Board moderators
In case anyone is struggling with WA using a Binary Search The Answer approach with Java BigInteger... The following statement may not currently apply to all the test input: