Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
158651 章泽原 元音字母转换 C++ Accepted 1 MS 276 KB 605 2026-08-22 16:20:48

Tests(1/1):


Code:

#include <iostream> #include <string> #include <cctype> using namespace std; int main() { int T; cin >> T; while (T--) { string s; cin >> s; string res; for (char ch : s) { char c = tolower(ch); // 元音 a e i o u if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u') { res += toupper(ch); } else { res += tolower(ch); } } cout << res << endl; } return 0; }