FunctionRacerProblemsRace

Integer Square Root

EasyMathPython, JavaScript, TypeScript

Return the square root of x rounded down to a whole number. Do not use **0.5, sqrt or pow.

Example 1

x 8
returns 2

The root is about 2.83, rounded down to 2.

Example 2

x 16
returns 4

Exactly 4.

Constraints

Race itor take your time

Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.

More Math problems