题目链接:https://nanti.jisuanke.com/t/T1113
算法特工队QQ群:979618872 (伸手党绕边,欢迎有良好基础的人加入)
//
// Created by Leo Lee on 2019/4/5.
//
#include <iostream>
#include <string>
using namespace std;
int main(){
string str;
int cases;
cin>>cases;
while(cases--){
cin>>str;
for(int i = 0;i<str.size();i++){
if(i==0){
if(str[i]>=97&&str[i]<=122){
printf("%c",str[i]-32);
} else
printf("%c",str[i]);
}
else if(str[i]>=65 && str[i]<=90)
printf("%c",str[i]+32);
else
printf("%c",str[i]);
}
cout<<endl;
}
return 0;
}