Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
91599 | 罗迎甲 | 字符替换 | C++ | Accepted | 1 MS | 276 KB | 221 | 2024-09-22 11:04:14 |
#include<bits/stdc++.h> using namespace std; int main() { char s[200],A,B; int i=0; cin>>s>>A>>B; while(s[i]!='\0'){ if(s[i]==A) s[i]=B; cout<<s[i]; i++; } cout<<endl; return 0; }