Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
146389 杜禹轩 字符替换 C++ Accepted 0 MS 276 KB 305 2026-01-28 13:29:31

Tests(5/5):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ char a[201]={},z,x; cin>>a>>z>>x; for(int i=0;a[i]!='\0';i++){ if(a[i]==z){ a[i]=x; } } cout<<a; return 0; } /**7777788888 cout<<a<<endl; 7 8 8 7 88888 7 8 8 7 88888 cin.getline(a,100000);**/