fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int a, b, c, d, e, cnt = 0;
  6.  
  7. cin >> a >> b >> c >> d >> e;
  8.  
  9. if (a - 1000 <= b) cnt++;
  10. if (a - 1000 <= c) cnt++;
  11. if (a - 1000 <= d) cnt++;
  12. if (a - 1000 <= e) cnt++;
  13.  
  14. cout << cnt;
  15.  
  16. return 0;
  17. }
Success #stdin #stdout 0.01s 5316KB
stdin
40060 40000 39800 38996 37737
stdout
2