We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Here's a version without imports. The key is that we are only looking for the number of integers in the range that are squares, not the actual numbers themselves. So we just need the smallest possible and the largest possible. Here int() acts the same as math.floor().
Sherlock and Squares
You are viewing a single comment's thread. Return to all comments →
Here's a version without imports. The key is that we are only looking for the number of integers in the range that are squares, not the actual numbers themselves. So we just need the smallest possible and the largest possible. Here
int()
acts the same asmath.floor()
.