| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 158841 | 格林老师 | 词组缩写 | C++ | Accepted | 0 MS | 276 KB | 575 | 2026-08-22 17:53:35 |
#include <bits/stdc++.h> using namespace std; int main() { int T; cin>>T; cin.ignore(); while(T--){ string s; getline(cin,s); string new_s; //new_s="" bool f=1; for (int i=0;i<s.size();i++){ if (s[i]==' '){ // 不能写 (" ") f=1; } else{ if (f){ new_s+=toupper(s[i]); //toupper()大写 f=0; } } } cout<<new_s<<"\n"; } return 0; }