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. int cnt = 0;
  12. for (int i = 1; i <= n; i++)
  13. {
  14. cin >> a[i];
  15. if (a[i] % 2 == 0)
  16. cnt++;
  17. }
  18. cout << cnt;
  19. }
Success #stdin #stdout 0s 5308KB
stdin
Standard input is empty
stdout
Standard output is empty