mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
1b4d6396e4
2700-2799
27 lines
552 B
C++
27 lines
552 B
C++
#include <stdio.h>
|
|
#include <string.h>
|
|
int main()
|
|
{
|
|
char key[28],str[84];
|
|
while(scanf("%s",key)!=EOF)
|
|
{
|
|
getchar();
|
|
gets(str);
|
|
int i,len;
|
|
len=strlen(str);
|
|
for(i=0;i<len;i++)
|
|
{
|
|
if(str[i]>='A'&&str[i]<='Z')
|
|
{
|
|
str[i]=key[str[i]-'A']-'a'+'A';
|
|
}
|
|
else if(str[i]>='a'&&str[i]<='z')
|
|
{
|
|
str[i]=key[str[i]-'a'];
|
|
}
|
|
}
|
|
printf("%s\n",str);
|
|
}
|
|
return 0;
|
|
}
|