没有比我这更简单的了吧,一个字:清晰易懂 #include<iostream> #include<string> using namespace std; string HJ96(string s) { if (s.empty()) return s; int n = s.size(); string res = ""; bool isnum = false; for (auto c : s) { if (isdigit(c)) { if ( !isnum ) ...