| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 158455 | 格林老师 | 词组缩写 | C++ | Accepted | 1 MS | 276 KB | 569 | 2026-08-21 23:49:53 |
#include <bits/stdc++.h> using namespace std; int main() { int T; cin>>T; cin.ignore(); //吃掉T后面的换行 while (T--){ string s; getline(cin,s); string new_s; bool first = true; for (int i=0;i<s.size();i++){ if (s[i]==' '){ first = true; }else{ if(first){ new_s += toupper(s[i]); first = false; } } } cout<<new_s<<"\n"; } return 0; }