Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
113133 王煜鑫 字符串替换 C++ Accepted 2 MS 300 KB 305 2025-03-15 12:02:17

Tests(10/10):


Code:

#include <bits/stdc++.h> using namespace std; string a,b; int main() { cin>>a>>b; int len1=a.size(); for(int i=0;i<len1;i++){ if(a[i]>='a'&&a[i]<='z'){ cout<<b[a[i]-'a']; } else if(a[i]>='A'&&a[i]<='Z'){ cout<<char(b[a[i]-'A']-32); } } return 0; }