题解
2023-10-17 20:18:29
发布于:广东
9阅读
0回复
0点赞
#include <bits/stdc++.h>
using namespace std;
int len;
string s;
int main()
{
	cin>>s;
	len=s.size();
	for(int i=0;i<=len-1;i++)
	{
		if(s[i]>='a' and s[i]<='w' or s[i]>='A' and s[i]<='W' )
			s[i]+=3;
		else if(s[i]>='x' and s[i]<='z' or s[i]>='X' and s[i]<='Z' )
			s[i]-=23;
		if(s[i]>='a' and s[i]<='z')
			s[i]-=32;
		else if(s[i]>='A' and s[i]<='Z' )
			s[i]+=32;			
	}
	for(int i=len-1;i>=0;i--) cout<<s[i];
	
	
    return 0;
}
这里空空如也

有帮助,赞一个