mirror of
https://github.com/tiennm99/codeforces.git
synced 2026-06-09 14:11:38 +00:00
22 lines
263 B
C++
22 lines
263 B
C++
#include <iostream>
|
|
|
|
using namespace std;
|
|
|
|
int main()
|
|
{
|
|
int n;
|
|
cin >> n;
|
|
int sum = 0;
|
|
while (n--)
|
|
{
|
|
int p, q;
|
|
cin >> p >> q;
|
|
if (q - p >= 2)
|
|
{
|
|
sum++;
|
|
}
|
|
}
|
|
cout << sum;
|
|
return 0;
|
|
}
|