Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
88491 | 陈昊然 | 字符替换 | C++ | Accepted | 1 MS | 268 KB | 239 | 2024-08-19 11:09:16 |
#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; }