467A

#include <stdio.h>

int main()
{
    int n;
    int p, q;
    int rooms=0;
    scanf("%d", &n);
    int i;
    for(i=0; i<n; ++i)
    {
        scanf("%d %d", &p, &q);
        if((q-p)>=2)
            ++rooms;
    }
    printf("%d\n", rooms);
    return 0;
}

  

猜你喜欢

转载自www.cnblogs.com/ozxics/p/10656563.html