| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 150983 | 李鸣 | 词组缩写 | C++ | Accepted | 1 MS | 264 KB | 614 | 2026-04-02 15:57:22 |
#include <iostream> #include <string> #include <sstream> #include <cctype> using namespace std; int main() { int T; cin >> T; // 读取T之后的换行,避免getline读空行 cin.ignore(); for (int i = 0; i < T; ++i) { string line; getline(cin, line); stringstream ss(line); string word; string res; while (ss >> word) { // 取单词首字符转大写 char c = toupper(word[0]); res += c; } cout << res << endl; } return 0; }