| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 159411 | Kevin | 字符串替换 | C++ | Wrong Answer | 1 MS | 268 KB | 579 | 2026-08-30 16:56:27 |
#include<bits/stdc++.h> using namespace std; char s[26]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'}; char s1[1000000]; char s2[26]; int main() { cin>>s1>>s2; int len=strlen(s1); char t; int cnt; for(int i=0;i<len;i++){ if(s1[i]>='A'&&s1[i]<='Z'){ t=s1[i]+32; } else{ t=s1[i]; } for(int j=0;j<=25;j++){ if(t==s[j]){ cnt==j; break; } } if(s1[i]>='A'&&s1[i]<='Z'){ cout<<char(s2[cnt]-32); } else{ cout<<s2[cnt]; } } return 0; }
------Input------
AAABBBBCCCDDDabbc emtnohkgfsdajpircvqlxbuzwy
------Answer-----
EEEMMMMTTTNNNemmt
------Your output-----
EEEEEEEEEEEEEeeee