| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 | 
|---|---|---|---|---|---|---|---|---|
| 133266 | 田子熙 | 词组缩写 | C++ | Accepted | 1 MS | 276 KB | 500 | 2025-10-18 11:46:54 | 
#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; } return 0; }