Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
3548 | 邓小龙 | 字符串替换 | C++ | Accepted | 0 MS | 324 KB | 315 | 2024-06-15 11:42:36 |
# 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; }