Re: 10023 - Square root
Posted: Tue May 31, 2016 1:05 am
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:
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.