| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 158597 | 章泽原 | 词组缩写 | C++ | Accepted | 1 MS | 272 KB | 489 | 2026-08-22 15:28:31 |
#include <iostream> #include <string> using namespace std; int main() { int T; cin >> T; cin.ignore(); // 吸收换行 while (T--) { string s, ans; getline(cin, s); bool flag = true; for (char c : s) { if (flag && isalpha(c)) { ans += toupper(c); flag = false; } if (c == ' ') flag = true; } cout << ans << endl; } return 0; }