number. Return the whole part of its square root, that is, the largest integer r ≥ 0 such that r · r ≤ number.
Built-in power and root helpers are off limits: no number ** 0.5, math.sqrt, math.isqrt or pow. Get there with comparisons and integer arithmetic alone.number=49 → 7
7 · 7 = 49, so the root is exact.
number=50 → 7
The square root of 50 is about 7.07; dropping the fraction leaves 7.
number=0 → 0
number ≤ 2³¹ − 1number=49
7
Run checks the first 3 tests in your browser. Submit checks all 59 tests on the server, hidden ones included.