Run ID Author Problem Lang Verdict Time Memory Code Length Submit Time
44261 lnx 整理药名 C++ Wrong Answer 1 MS 252 KB 465 2024-03-29 15:58:15

Tests(0/1):


#include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; char ch[100][n]; for(int i=0;i<n;i++) { cin>>ch[i]; for(int j=0;j<strlen(ch[i]);j++) { if(j==0) { if(ch[i][0]>='a'&&ch[i][0]<='z') ch[i][0]=(char)((int)ch[i][0]-32); } else { if(ch[i][j]>='A'&&ch[i][j]<='Z') ch[i][j]=(char)((int)ch[i][j]+32); } } } for(int i=0;i<n;i++){ cout<<ch[i]<<endl; } }


Judgement Protocol: