Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
163444 刘杨国卿 字符替换 C++ Accepted 1 MS 276 KB 227 2026-10-25 12:13:51

Tests(5/5):


Code:

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