fork download
  1. #include <bits/stdc++.h>
  2.  
  3. using namespace std;
  4.  
  5. int n, a[(int)(1e5 + 10)];
  6.  
  7. int main()
  8. {
  9. ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
  10. cin >> n;
  11. for (int i = 1; i <= n; i++)
  12. cin >> a[i];
  13. int cnt = 0;
  14. for (int i = 1; i <= n; i++)
  15. if (a[i] % 2 == 0)
  16. cnt++;
  17. cout << cnt;
  18. }
Success #stdin #stdout 0s 5320KB
stdin
Standard input is empty
stdout
Standard output is empty