社区讨论
0
B2117整理药名参与者 3已保存回复 2
讨论操作
快速查看讨论及其快照的属性,并进行相关操作。
- 当前回复
- 2 条
- 当前快照
- 1 份
- 快照标识符
- @mlnl49zk
- 此快照首次捕获于
- 2026/02/15 18:10 4 天前
- 此快照最后确认于
- 2026/02/16 12:36 3 天前
CPP
#include <bits/stdc++.h>
using namespace std;
int n;
string s;
int main() {
cin>>n;
for(int i=1;i<=n;i++){
cin>>s;
if(s[1]>='z' and s[1]<='a'){
cout<<s[1]-32;
}
for(int i=2;i<=s.length();i++){
if(s[i]>='Z' and s[i]<='A'){
cout<<s[i]+32;
}
}
cout<<"\n";
}
return 0;
}
回复
共 2 条回复,欢迎继续交流。
正在加载回复...