Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
81823 石晋骁 字符替换 C++ Wrong Answer 1 MS 272 KB 268 2024-07-12 15:38:55

Tests(0/5):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ char s[201]; char a,b; cin >> s; cin >> a >> b; for(int i = 1;i <= strlen(s);i++){ if(s[i] == a){ s[i] = b; } } for(int j = 1;j <= strlen(s);j++){ cout << s[j]; } return 0; }


Run Info:

------Input------
2222211111 2 1
------Answer-----
1111111111
------Your output-----
111111111