题比较简单,直接贴代码 1. 格式化字符串(string遍历) int main() { string s; cin >> s; if (s.size() == 0) { cout << s << endl; return 0; } s += 'n'; int index = 1, last = 0; vector<string> ans; while (s.find('n', index) != s.npos) { int ...