1、统计数字,只有80%,感觉代码还可以,借助哈希,无需用到set,vector等容器 #include<iostream> #include<string> using namespace std; int main() { int record[10] = { 0 }; string s; while (getline(cin, s)) { for (unsigned int i = 0; i<s.size(); i++) { record[s[i] - 48]++; } ...