Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
155366 李沐阳 字符替换 C++ Accepted 1 MS 272 KB 236 2026-06-07 10:53:51

Tests(5/5):


Code:

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