Run ID:158479

提交时间:2026-08-22 10:52:52

#include <bits/stdc++.h> using namespace std; int main() { int T; cin>>T; cin.ignore(); while(T--){ string s; getline(cin,s); bool first=true; string new_s; for (int i=0;i<s.size();i++){ if (s[i]==' '){ first=true; } else{ if (first==true){ new_s+=toupper(s[i]); first=false; } } } cout<<new_s<<"\n"; } }