| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 136266 | 彭士宝 | 元音字母转换 | C++ | Accepted | 2 MS | 272 KB | 556 | 2025-11-09 23:27:12 |
#include <iostream> #include <string> #include <cctype> using namespace std; bool isVowel(char c) { c = tolower(c); return c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u'; } int main() { int T; cin >> T; cin.ignore(); while (T--) { string str; getline(cin, str); for (char &c : str) { if (isVowel(c)) { c = toupper(c); } else { c = tolower(c); } } cout << str << endl; } return 0; }