2 solutions
-
3
#include<bits/stdc++.h> using namespace std; const int N=110; char s[N]; int main() { int n; cin>>n; for(int i=0;i<n;i++) { cin>>s; int m=strlen(s); if(s[0]>='a'&&s[0]<='z') { s[0]-=32; } for(int j=1;j<m;j++) { if(s[j]>='A'&&s[j]<='Z') { s[j]+=32; } } cout<<s<<endl; } return 0; }
- 1
Information
- ID
- 918
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 1
- Tags
- (None)
- # Submissions
- 50
- Accepted
- 29
- Uploaded By