#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main() {
string str;
int cnt = 0;
cin >> str;
int len = str.length();
for(int i = 0; i < len; ++i) {
if(str[i] >= 'A' && str[i] <= 'Z') cnt++;
}
if(cnt == len) {
for(int i = 0; i < len; ++i) {
putchar(str[i]-'A'+'a');
}
cout << endl;
} else if(str[0] >= 'a' && str[0] <= 'z' && cnt == len - 1) {
putchar(str[0]-'a'+'A');
for(int i = 1; i < len; ++i) {
putchar(str[i]-'A'+'a');
}
cout << endl;
} else {
cout << str << endl;
}
return 0;
}
131A - cAPS lOCK
最新推荐文章于 2019-04-04 19:00:00 发布