题意:给定一个字符串,按照给定的规则进行变换。
解题思路:简单模拟。
Code:
#include <iostream>
#include <cstring>
#include <cstdio>
using namespace std;
char str[10010];
int main()
{
//freopen("input.txt","r",stdin);
while(~scanf("%s",str))
{
int len = strlen(str);
for(int i = 0; i<len; i++)
{
if(str[i]=='b') printf(" ");
else if(str[i]=='q') printf(",");
else if(str[i]=='t') printf("!");
else if(str[i]=='m') printf("l");
else if(str[i]=='i') printf("e");
else if(str[i]=='c') printf("a");
else if(str[i]=='a') printf("c");
else if(str[i]=='e') printf("i");
else if(str[i]=='l') printf("m");
else printf("%c",str[i]);
}
printf("\n");
}
return 0;
}