@wzrw

小黄  •  3天前


include <bits/stdc++.h>

using namespace std;

int main() {

int k, x;
int cnt1 = 0, cnt5 = 0, cnt10 = 0;

cin >> k;          // 读入个数
for (int i = 0; i < k; ++i) {
    cin >> x;      // 读入每个数
    if (x == 1) cnt1++;
    else if (x == 5) cnt5++;
    else if (x == 10) cnt10++;
}

cout << cnt1 << " " << cnt5 << " " << cnt10;
return 0;

}


评论:

请先登录,才能进行评论