Advertisement
Zuneve

weaqfawQE

Nov 18th, 2022
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. #include <iostream>
  2. #include <vector>
  3. using namespace std;
  4.  
  5. int main() {
  6. int n, cnt=0;
  7. cin >> n;
  8. vector <int> a(n);
  9. for (int i = 0; i<n; i++) {
  10. cin >> a[i];
  11. }
  12. for (auto c : a) {
  13. if (c>0) {
  14. cnt++;
  15. }
  16. } cout << cnt;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement