题目链接
#include <cstdio>
#include <cstring>
#include <string>
#include <cmath>
#include <ctime>
#include <cstdlib>
#include <iostream>
using namespace std;
#define LL long long
#define MOD 1000000007
int p[];
int judge(int x)
{
int str,end,mid;
if(x <= )
return ;
str = ;
end = ;
while(str < end)
{
mid = (str + end + )/;
if(p[mid] > x)
end = mid - ;
else
str = mid;
}
return end;
}
int main()
{
int x,y,i;
for(i = ;i <= ;i ++)
p[i] = i*i;
while(scanf("%d%d",&x,&y)!=EOF)
{
if(x == &&y == ) break;
printf("%d\n",judge(y)-judge(x-));
}
return ;
}