| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 | 
|---|---|---|---|---|---|---|---|---|
| 133254 | 石水生 | 词组缩写 | C++ | Accepted | 2 MS | 272 KB | 490 | 2025-10-18 11:25:49 | 
#include <bits/stdc++.h> using namespace std; int main(){ int T; cin>>T; cin.get(); for(int i=1;i<=T;i++){ string s; getline(cin,s); for(int j=0;j<=s.length()-1;j++){ if(j==0&&s[j]>='a'&&s[j]<='z'){ cout<<char(s[0]-32); }else if(j==0&&s[0]>='A'&&s[0]<='Z'){ cout<<s[0]; } if(s[j]==' '&&s[j+1]>='a'&&s[j+1]<='z'){ cout<<char(s[j+1]-32); }else if(s[j]==' '&&s[j+1]>='A'&&s[j+1]<='Z'){ cout<<s[j+1]; } } cout<<endl; } }