fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. long long d, p,n,x,c=0,l=0;
  6. cin>> d>>p;
  7. for (long long i=0;i<d;i++){
  8. cin>> n>> x;
  9. if ((n/p-x)<0)c++;
  10.  
  11.  
  12. }
  13. cout << c<<endl;
  14.  
  15.  
  16. return 0;
  17. }
Success #stdin #stdout 0.01s 5516KB
stdin
5 2
100 50
100 51
10 2
10 10
0 1
stdout
3