Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
40617 | chenyifei | 整理药名 | C++ | Accepted | 1 MS | 252 KB | 395 | 2024-02-14 20:19:41 |
#include<iostream> #include<cstring> #include<string> using namespace std; int main() { int n; cin>>n; char s[101]; for(int i=0;i<n;i++) { cin>>s; if(s[0]>='a'&&s[0]<='z') s[0]-=32; for(int j=1;j<=strlen(s);j++) if(s[j]>='A'&&s[j]<='Z') s[j]+=32; cout<<s<<endl; } return 0; }