Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
62213 段文昊 字符替换 C++ Accepted 1 MS 276 KB 241 2023-12-18 21:50:39

Tests(5/5):


Code:

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