#include<bits/stdc++.h> using namespace std; int main() { string s; cin>>s; string a = "black",b = "block"; int p = s.find(a); while(p != string::npos) { /*s.erase(p,5); s.insert(p,b); */ s.replace(p,5,b); p = s.find(a); } cout<<s<<endl; return 0; }
微信直接扫码登录
使用经过邮箱注册的账号密码登录