Given a non-negative integer x, return the integer square root of x — the largest integer r such that r² ≤ x. Do not use built-in exponent/sqrt functions.
Input: one line, the integer x.
Output: the integer square root.
4
2
8
2
√8 ≈ 2.83, truncated to 2.
Run your code against the sample tests, or Submit to run the full suite.