#include <iostream>
#include <string>
using namespace std;
char c;
string s;
int main()
{
cin>>s;
int len=s.size();
for (int i=0; i<len; i++)
if (s[i]>='A' && s[i] <='Z')
s[i]=(s[i]+2-'A') % 26 + 'A';
else
s[i]=(s[i]+2-'a') % 26 + 'a';
for (int i=0; i<(len-1)/2; i++)
{
c=s[i];
s[i]=s[len-i-1];
s[len-i-1]=c;
}
for (int i=0; i<len; i++)
if (s[i]>='A' && s[i] <='Z')
s[i]=s[i]-'A'+'a';
else
s[i]=s[i]-'a'+'A';
cout<<s<<endl;
return 0;
}
输入:
NbZxs 输出:UZbDp
|