第一道简单密码学的题,太水了,本不打算做,第一道,还是纪念一下。
#include <iostream>
#include <cstdio>
#include <cstring>
#include <string.h>
#include <algorithm>
using namespace std;
char trans[30]={'V','W','X','Y','Z','A','B','C','D','E','F','G','H','I','J',
'K','L','M','N','O','P','Q','R','S','T','U'};
char en[20];
char scode[200];
bool readin(){
gets(en);
if(strcmp(en,"START")==0)
return true;
return false;
}
int main(){
while(readin()){
gets(scode);
for(int i=0;scode[i]!='\0';i++){
if(scode[i]<'A'||scode[i]>'Z')
cout<<scode[i];
else
cout<<trans[scode[i]-'A'];
}
cout<<endl;
gets(en);
}
return 0;
}