fork download
  1. #include<stdio.h>
  2. #include<math.h>
  3. int main()
  4. {
  5. long long int a , b,coun;
  6. while(scanf("%lld %lld",&a,&b) && (a!=0 || b!=0))
  7. {
  8. coun=sqrt(b)+1-sqrt(a);
  9. printf("%lld\n",coun);
  10. }
  11. return 0;
  12. }
Success #stdin #stdout 0s 16064KB
stdin
4 9
0 0
stdout
2