Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
117683 蔡书涵 字符替换 C++ Wrong Answer 1 MS 276 KB 417 2025-04-19 17:29:22

Tests(2/5):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ char n[200]; char A,B; int i=0; cin>>n>>A>>B; while(n[i]==A){ n[i]=B; i++; } cout<<n<<endl; return 0; }


Run Info:

------Input------
aaccddddddd d 6
------Answer-----
aacc6666666
------Your output-----
aaccddddddd