投递海康威视等公司10个岗位 >
0 点赞 评论 收藏
分享
QT菜鸡弟弟:so easy五分钟搞定🤣🤣 #include <iostream>
#include <algorithm>
#include <vector>
#include<string>
using namespace std;
int main()
{
string sentence, sensitive;
while (cin >> sentence >> sensitive)
{
int sizeA = sentence.length();
int sizeB = sensitive.length();
int position;
position = sentence.find(sensitive);
if (position != -1)
{
string instead(sizeB, 0);
for (int i = 0; i < sizeB; i++)
{
instead[i] = '*';
}
sentence.replace(position, sensitive.length(), instead);
cout << sentence << endl;
}
else
cout << sentence << endl;
}
}
投递华为等公司10个岗位 >
0 点赞 评论 收藏
分享
0 点赞 评论 收藏
分享
关注他的用户也关注了: