#include<stdio.h>
#include<math.h>
int main()
{
long long int a,b,i,j,x,count,temp;
double y;
while(scanf("%lld%lld",&a,&b)==2)
{
if((a==0)&(b==0))
break;
if(a>b)
{
temp=a;
a=b;
b=temp;
}
count=0;
x=0;
for(i=a;i<=b;i++)
{
x=sqrt(i);
if((x*x)==i)
count++;
}
printf("%lld\n",count);
}
return 0;
}
#include<math.h>
int main()
{
long long int a,b,i,j,x,count,temp;
double y;
while(scanf("%lld%lld",&a,&b)==2)
{
if((a==0)&(b==0))
break;
if(a>b)
{
temp=a;
a=b;
b=temp;
}
count=0;
x=0;
for(i=a;i<=b;i++)
{
x=sqrt(i);
if((x*x)==i)
count++;
}
printf("%lld\n",count);
}
return 0;
}
No comments:
Post a Comment