You are viewing a single comment's thread. Return to all comments →
same problem using while. cannot complete due to timeout
def squares(a, b): c = 0 i = a while i <= b: if math.sqrt(i) == math.floor(math.sqrt(i)): c += 1 i += 1 return c
Seems like cookies are disabled on this browser, please enable them to open this website
Sherlock and Squares
You are viewing a single comment's thread. Return to all comments →
same problem using while. cannot complete due to timeout
def squares(a, b): c = 0 i = a while i <= b: if math.sqrt(i) == math.floor(math.sqrt(i)): c += 1 i += 1 return c