活动地址:牛客春招刷题训练营 - 编程打卡活动 Easy 表示数字 简要题意 给一个字符串,将每个完整的连续数字子串左右添上一对 *。 Solution 记录上个字符是不是数字,如果发生变化就添上 *,记得特判结尾。 Code void R() { bool t=0; string s; cin>>s; for (char c:s) { if (t^isdigit(c)) cout<<'*',t^=1; cout<<c; } if (t) cout<<'*'; return; } Medium 球格模型(简单版...