Python 3.8 (pre-release), 40 bytes
This one works with python integers, giving the correct result even for arbitrarily large integers. Always rounds down.
lambda x:isqrt(x*x//2)
from math import*
Stef
- 957
- 4
- 16
Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack ExchangeThis one works with python integers, giving the correct result even for arbitrarily large integers. Always rounds down.
lambda x:isqrt(x*x//2)
from math import*