Run ID:148853
提交时间:2026-03-01 19:29:27
#include <iostream> #include <string> #include <cctype> // 用于字符转换函数toupper() using namespace std; int main() { int t; cin >> t; cin.ignore(); for (int i = 0; i < t; ++i) { string s; getline(cin, s); string n; bool f = true; for (char c : s) { if (c == ' ') { f = true; } else if (f) { n += toupper(c); f = false; } } cout << n << endl; } return 0; }