Run ID:148841

提交时间:2026-03-01 19:12:26

#include<bits/stdc++.h> using namespace std; string s; int t; int main(){ cin>>t; cin.get(); for(int j=1;j<=t;j++){ 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); } } s=""; } return 0; }