Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
134038 石水生 字符替换 C++ Accepted 1 MS 280 KB 210 2025-10-25 15:10:32

Tests(5/5):


Code:

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