Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
113134 | 刘佳宇 | 字符串替换 | C++ | Accepted | 2 MS | 296 KB | 302 | 2025-03-15 12:02:25 |
#include<bits/stdc++.h> using namespace std; int main(){ string s2,s1; cin>>s1>>s2; int len=s1.size(); for(int i=0;i<len;i++){ if(s1[i]>='a'&&s1[i]<='z'){ cout<<s2[s1[i]-'a']; } else if(s1[i]>='A'&&s1[i]<='Z'){ cout<<char(s2[s1[i]-'A']-32); } } return 0; }