Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
159554 李昱龙 字符替换 C++ Accepted 1 MS 272 KB 227 2026-09-05 14:46:11

Tests(5/5):


Code:

#include<bits/stdc++.h> using namespace std; char a[1005]; int main(){ cin>>a; char k,l; int len=strlen(a); cin>>k>>l; for(int i=0;i<=len-1;i++){ if(a[i]==k){ a[i]=l; } cout<<a[i]; } return 0; }