Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
158989 格林老师 元音字母转换 C++ Accepted 2 MS 276 KB 456 2026-08-24 13:24:55

Tests(1/1):


Code:

#include <bits/stdc++.h> using namespace std; int main() { int T; cin>>T; while(T--){ string s; cin>>s; for (int i=0;i<s.size();i++){ char c=tolower(s[i]); if (c=='a' || c=='o' || c=='e' || c=='i' || c=='u'){ s[i]=toupper(c); } else{ s[i]=tolower(c); } } cout<<s<<"\n"; } return 0; }