Advertisement
a53

PSR

a53
Mar 29th, 2019
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int n,S=0;
  8. long double A;
  9. unsigned long long int R;
  10. cin>>n;
  11. while(n--)
  12. {
  13. cin>>A>>R;
  14. if((unsigned long long int)sqrt(A*(A+1)*(A+2)*(A+3)+1)==R)
  15. ++S;
  16. }
  17. cout<<S;
  18. return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement