10 solutions
-
1
#include<bits/stdc++.h> using namespace std; const int maxn = 105; int main(){ int n, x, y, z; x=y=z=0; int a[maxn]; cin >> n; for(int i = 0 ;i < n; i++){ cin >> a[i]; if(a[i] == 1){ x++; } else if(a[i] == 5){ y++; } else if(a[i] == 10){ z++; } } cout << x << endl << y << endl << z; return 0; }
- 1
Information
- ID
- 556
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 2
- Tags
- # Submissions
- 138
- Accepted
- 85
- Uploaded By