rengetsu

Codeforces_467A

Jul 24th, 2018
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.25 KB | None | 0 0
  1. //Codeforces Round 467A
  2. #include <iostream>
  3. using namespace std;
  4. int main()
  5. {
  6.     int n, p, q, answ=0;
  7.     cin >> n;
  8.     for(int i=0;i<n;i++)
  9.     {
  10.         cin >> p >> q;
  11.         if((q-p)>=2){answ++;}
  12.     }
  13.     cout << answ;
  14.     return 0;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment