https://www.hackerrank.com/challenges/sherlock-and-squares/problem
import math q = int(input().strip()) for _ in range(q): a, b = map(int, input().strip().split(' ')) _start = math.ceil((math.sqrt(a))) ret = 0 while _start**2 <= b: ret += 1 _start += 1 print(ret)
댓글 없음:
댓글 쓰기