Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
98342 Kevin 字符替换 C++ Accepted 1 MS 272 KB 241 2024-11-19 15:42:23

Tests(5/5):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ char s[200],a,b; gets(s); cin>>a>>b; int len=strlen(s); for(int i=0;i<len;i++){ if(s[i]==a){ cout<<b; } else { cout<<s[i]; } } return 0; }