Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
112187 张湘哲 字符替换 C++ Accepted 1 MS 276 KB 225 2025-03-08 16:44:27

Tests(5/5):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ char s[201],a,b; int i=0; cin>>s>>a>>b; while(s[i]!='\0'){ if(s[i]==a) s[i]=b; i++; } cout<<s; return 0; }