Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- long long int a,b,i,c,sum;
- while(scanf("%lld%lld",&a,&b)!=EOF && (a!=0 || b!=0))
- {
- sum=0;
- for(i=1; i<=b; i++)
- {
- c=i*i;
- if(c>=a && c<=b)
- sum++;
- }
- printf("%lld\n",sum);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment