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.
Sherlock and Squares
Sherlock and Squares
Sort by
recency
|
1593 Discussions
|
Please Login in order to post a comment
a1=math.ceil(math.sqrt(a)) b1=math.floor(math.sqrt(b)) roots=(x for x in range(a1,b1+1)) roots1=list(roots) return len(roots1)
Python3 solution:
for _ in range(int(input())): import math a,b=map(int,input().split()) print(math.floor(b0.5) - math.ceil(a0.5) + 1)
This is solution for begginer