Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
3512 | 莫业祁 | 字符串替换 | C++ | Accepted | 0 MS | 320 KB | 315 | 2024-06-14 20:35:57 |
# include<iostream> # include<cstring> using namespace std; int main(){ string s1,s2,s3=""; int temp=0; cin>>s1>>s2; for(int i=0;i<s1.size();i++){ temp=(int)s1[i]; if(temp>=97) s3+=s2[temp-97]; if(temp<=90) s3+=(char)(s2[temp-65]-32); } cout<<s3<<endl; }