| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 71765 | 石茂诤 | 字符串替换 | C++ | Wrong Answer | 1 MS | 268 KB | 296 | 2024-04-27 16:23:44 |
#include<bits/stdc++.h> using namespace std; int main(){ string s,s1; getline(cin,s); getline(cin,s1); int a=s.length(); for(int i=0;i<a;i++){ if(s[i]>='a'&&s[i]<='z'){ cout<<s1[s[i]-'a']; } if(s[i]>='A'&&s[i]<='A'){ cout<<char(s1[s[i]-'a']); } } return 0; }
------Input------
AAABBBBCCCDDDabbc emtnohkgfsdajpircvqlxbuzwy
------Answer-----
EEEMMMMTTTNNNemmt
------Your output-----
cccemmt