Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
88481 陈昊然 字符替换 C++ Accepted 1 MS 268 KB 215 2024-08-19 11:08:53

Tests(5/5):


Code:

#include<bits/stdc++.h> using namespace std; char c[201],a,b; int main(){ cin>>c>>a>>b; int n=strlen(c); int l=0; while(l<=n-1){ if(c[l]==a){ c[l]=b; } l++; } cout<<c; return 0; }