Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
118619 Kevin 字符替换 C++ Accepted 1 MS 272 KB 260 2025-05-06 15:36:13

Tests(5/5):


Code:

#include<iostream> #include<cstring> char a[205],b[205]; using namespace std; int main(){ gets(a); char A,B; cin>>A>>B; int len=strlen(a); for(int i=0;i<len;i++){ if(a[i]==A){ b[i]=B; } else b[i]=a[i]; } cout<<b; return 0; }