Update: Rename folder name to XSMOJ

This commit is contained in:
2025-02-14 02:44:20 +00:00
parent 394e431a4a
commit c8863a5850
243 changed files with 11 additions and 39 deletions

34
XSMOJ/整理药名.cpp Normal file
View File

@ -0,0 +1,34 @@
#include <iostream>
#include <iomanip>
#include <cstring>
#include <cstdio>
#include <ctime>
#include <cmath>
typedef long long l;
typedef double d;
typedef char c;
using namespace std;
int main(){
c a[100][100];
l b;
cin >>b;
for(int i=0;i<b;i++){
cin >>a[i];
}
for(int i=0;i<b;i++){
for(int j=1;j<strlen(a[i]);j++){
if(a[i][j]>='A' && a[i][j]<='Z'){
a[i][j]+=32;
}
}
}
for(int i=0;i<b;i++){
if(a[i][0]>='a' && a[i][0]<='z'){
a[i][0]-=32;
}
}
for(int i=0;i<b;i++){
cout <<a[i]<<endl;
}
return 0;
}