Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
146386 王培臻 字符替换 C++ Accepted 1 MS 276 KB 219 2026-01-28 13:28:29

Tests(5/5):


Code:

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