中级守护
#include<iostream>
#include<string>
#include<cstring>
using namespace std;
int main()
{
int num=0,x=0,sum=1,k;
string s;
getline(cin,s);
int l=s.size();
for(int i=0;i<l;i++)
{
if(s[i]%2==1&&s[i]>='A'&&s[i]<='Z')
{
s[i]+=32;
}
if(s[i]%2==0&&s[i]>='a'&&s[i]<='z')
{
s[i]-=32;
}
}
for(int i=0;i<l;i++)
{
x++;
if(s[i]>='0'&&s[i]<='9')
{
k=s[i]-'0';
if(k>l)
{
k=l-(l-(x-1));
}
for(int j=1;j<=k;j++)
{
swap(s[i-num],s[i-sum]);
num++;
sum++;
}
num=0;
sum=1;
}
}
cout<<s;
return 0;
}
90分!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!