提交时间:2024-01-19 14:36:05
运行 ID: 37045
#include<bits/stdc++.h> using namespace std; int a[105]; int main() { int n; cin>>n; for(int i=0;i<n;i++){ cin>>a[i]; } int sum1=0,sum2=0,sum3=0; for(int i=0;i<n;i++){ if(a[i]==1){ sum1++; }else if(a[i]==5){ sum2++; }else if(a[i]==10){ sum3++; } } cout<<sum1<<endl<<sum2<<endl<<sum3<<endl; return 0; }