Run ID:123660

提交时间:2025-07-09 08:46:02

#include<bits/stdc++.h> using namespace std; int main() { int t; cin >> t; char str[120]; getchar(); while (t--) { cin.getline(str, 120); bool flag = true; for (int i = 0; str[i] != '\0'; i++) { if (flag&&str[i] != ' ') { char tmp = str[i]; if (str[i] >= 'a'&&str[i] <= 'z')tmp += 'A' - 'a'; cout << tmp; flag = false; } else if (str[i] == ' ')flag = true; } cout << endl; } }