diff --git a/131A cAPS lOCK/131A.cpp b/131A cAPS lOCK/131A.cpp new file mode 100644 index 0000000..f22c762 --- /dev/null +++ b/131A cAPS lOCK/131A.cpp @@ -0,0 +1,40 @@ +#include +using namespace std; +using ll = long long; + +void solve() +{ + string s; + cin >> s; + bool cap = 1; + for (int i = 1; i < s.size(); ++i) + { + if (islower(s[i])) + { + cap = 0; + break; + } + } + if (cap) + { + for (int i = 0; i < s.size(); ++i) + { + if(islower(s[i])) + s[i]=toupper(s[i]); + else s[i]=tolower(s[i]); + } + } + cout<> TC; + // cin.ignore(); + while (TC--) + solve(); +} \ No newline at end of file