Run ID:158455
提交时间: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; }