Integer square root Newton
Your task
Compute the integer square root of a non-negative integer x WITHOUT using any floating point (no math.sqrt, no **0.5): return the largest integer r such that r*r <= x. Use Newton's method (integer iteration). Constraints: 0 <= x <= 10^18. Example: isqrt(8) = 2, isqrt(16) = 4.
Examples
integer_sqrt(x: int) -> intExample 1
Input
integer_sqrt(8)Output
2