Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
156239 李昱龙 字符串替换 C++ Accepted 2 MS 300 KB 315 2026-06-27 14:26:04

Tests(10/10):


Code:

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