#include<iostream>
#include<cstring>
#include<map>
using namespace std;
int main()
{
char a[200],b[200],c[200];
map<char,char> map1;
int len,i;
map1['A']='V';
map1['B']='W';
map1['C']='X';
map1['D']='Y';
map1['E']='Z';
map1['F']='A';
map1['G']='B';
map1['H']='C';
map1['I']='D';
map1['J']='E';
map1['K']='F';
map1['L']='G';
map1['M']='H';
map1['N']='I';
map1['O']='J';
map1['P']='K';
map1['Q']='L';
map1['R']='M';
map1['S']='N';
map1['T']='O';
map1['U']='P';
map1['V']='Q';
map1['W']='R';
map1['X']='S';
map1['Y']='T';
map1['Z']='U';
while(gets(a)&&strcmp(a,"ENDOFINPUT"))
{
while(gets(b)&&strcmp(b,"END"))
{
len=strlen(b);
for(i=0;i<len;i++)
{
if(b[i]>='A'&&b[i]<='Z')
cout<<map1[b[i]];
else
cout<<b[i];
}
cout<<endl;
}
}
}
poj 1048
最新推荐文章于 2019-09-24 10:54:35 发布