Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
98486 任斌 字符串替换 C++ Accepted 1 MS 308 KB 294 2024-11-23 10:14:55

Tests(10/10):


Code:

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