Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
136980 王丞杰 字符串替换 C++ Accepted 3 MS 296 KB 243 2025-11-15 17:12:18

Tests(10/10):


Code:

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