Page 9 of 9

Re: 10023 - Square root

Posted: Tue May 31, 2016 1:05 am
by Bryton
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:
It is guaranteed, that for given Y , X will be always an integer.
I got AC by returning X - 1 in case binary search gave me a value such that X*X > Y.

Re: 10023 - Square root

Posted: Fri Mar 02, 2018 1:24 pm
by metaphysis
Confirmed. I got AC by using method as Bryton said.