文章
85
粉丝
0
获赞
579
访问
16.2k
#include <bits/stdc++.h>
using namespace std;
int main () {
int n;
while (cin >> n&&n!=0) {
map<int,int > mp;
int score;
for (int i=0;i<n;i++) {
cin >> score;
mp[score]++;
}
int target;
cin >> target;
bool flag=false;
for (auto i:mp) {
if (i.first == target) {
cout << i.second << endl;
flag=true;
}
}
if (flag==false) {
cout << target << endl;
}
}
}
登录后发布评论
暂无评论,来抢沙发