a53

PSR_of

a53
Mar 29th, 2019
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. # include <iostream>
  2. using namespace std;
  3.  
  4.  
  5. int main()
  6. {
  7. int N, sol = 0; cin >> N;
  8. for (int i = 1; i<= N; i++)
  9. {
  10. long long a,r ; cin>>a>>r;
  11. long long r_c = a*a+3*a+1;
  12. if (r == r_c) sol++;
  13. }
  14. cout<<sol;
  15. return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment