5 条题解
- 1
信息
- ID
- 2078
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 3
- 标签
- 递交数
- 262
- 已通过
- 131
- 上传者
brjhgfvdbfrjhsdgbfhdgsfhdgygsyufgsuyguysfguy fguysgfuysgfyugyfugysgfygsyfgsuyg6r236r6g64tgf64g5rf76t65guytgre4tgg78e9tgju8rtgkl-659jyir8fg67efg67gt5h67fegft76rgf7efikjymolek,refopeh4tfghoipwijmeyhfiosm,ldja635e563wgrwf56efg
#include<bits/stdc++.h>
using namespace std;
string s;
int main(){
char ch1,ch2;
cin>>s>>ch1>>ch2;
for(int i=0; i<s.size();i++){
if(s[i]==ch1){
s[i]=ch2;
}
}
cout<<s;
return 0;
}
#include<bits/stdc++.h>
using namespace std;
int main(){
string s;
char ch1,ch2;
cin>>s>>ch1>>ch2;
for(int i=0 ;i<s.size();i++){
if(s[i]==ch1){
s[i]=ch2;
}
}
cout<<s;
return 0; }
#include<bits/stdc++.h> using namespace std; string s; int main(){ char ch1,ch2; cin>>s>>ch1>>ch2; for(int i = 0;i<s.length();i++){ if(s[i]==ch1){ s[i]=ch2; } } cout<<s; return 0; }