TLE and Constraints not followed


#1

The only constraint to handle is A=0,
all those saying use long long for A=INT_MAX , overflow problem is not due to not using long long. Even for 10^9 you will get overflow with int

Hint : don’t use mid*mid == A
use A/mid == mid
for mid, mid = l+(h-l)/2
(to avoid overflow, using long long is not only option)