Run ID:148850

提交时间:2026-03-01 19:27:02

#include<bits/stdc++.h> using namespace std; int t; int main(){ cin>>t; cin.ignore(); for(int j=1;j<=t;j++){ string s; getline(cin,s); cout<<(char)(s[0]-32); for(int i=1;i<s.size();i++){ if(s[i-1]==' '&&s[i]!=' '){ cout<<(char)(s[i]-32); } } } return 0; }