Saleh127

uva 11461.cpp

Jun 8th, 2020
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define test int t; cin>>t; while (t--)
  4. #define ll long long int
  5. #define Faster ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
  6. #define pi acos(-1)
  7. #define yes printf("YES\n");
  8. #define no printf("NO\n");
  9. int main()
  10. {
  11. Faster
  12. ll a,c,d,e,f,i,j,k,l;
  13. while(cin>>a>>c && a &&c)
  14. {
  15. e=0;
  16. for(i=a;i<=c;i++)
  17. {
  18. d=sqrt(i);
  19. if(d*d==i)
  20. {
  21. e++;
  22. }
  23. }
  24. cout<<e<<endl;
  25. }
  26. return 0;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment