题解 | #统计同成绩学生人数#
统计同成绩学生人数
https://www.nowcoder.com/practice/987123efea5f43709f31ad79a318ca69
#include <iostream> #include <map> using namespace std; int main() { int n; while(cin >> n && n != 0){ map<int, int> scores; while(n --){ int x; cin >> x; scores[x] ++; } int score; cin >> score; cout << scores[score] << endl; } return 0; } // 64 位输出请用 printf("%lld")