Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
102223 邹昊辰 字符替换 C++ Accepted 1 MS 272 KB 248 2024-12-21 13:55:19

Tests(5/5):


Code:

#include<iostream> using namespace std; int main (){ char a[201],x,b,c=0; cin.getline(a,201); cin>>b>>x; while(a[c]!='\0'){ if(a[c]==b){ a[c]=x; } c++; } cout<<a; return 0; }