Perfect Square Count

0

0 votes
Medium
Problem

A Perfect square number is an integer number whose square root is also an integer. For example 1, 4, 81 are some perfect square numbers. Given two numbers a and b you will have to find out how many square numbers are there between a and b (inclusive).

Input

  1. T test cases (1<=T<=10000)
  2. T lines two space sperated integers a, b (1<=a<=b<=10^9)

Output

T lines contain a single integer.

Time Limit: 1
Memory Limit: 256
Source Limit:
Editor Image

?