提交时间:2024-09-24 06:43:39
运行 ID: 51662
#include<bits/stdc++.h> using namespace std; int main() { int m, n, sumof1 = 0, sumof5 = 0, sumof10 = 0; cin >> m; for (int i = 1; i <= m; i++) { cin >> n; if (n == 1) { sumof1 += 1; }if (n == 5) { sumof5 += 1; }if (n == 10) { sumof10 += 1; } } cout << sumof1 << endl << sumof5 << endl <<sumof10; return 0; }