Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- using namespace std;
- int main()
- {
- int n,S=0;
- long double A;
- unsigned long long int R;
- cin>>n;
- while(n--)
- {
- cin>>A>>R;
- if((unsigned long long int)sqrt(A*(A+1)*(A+2)*(A+3)+1)==R)
- ++S;
- }
- cout<<S;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement