Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
148904 张奕杨 元音字母转换 C++ Accepted 1 MS 276 KB 468 2026-03-01 20:37:33

Tests(1/1):


Code:

#include<iostream> #include<cstring> using namespace std; int main(){ int x[200]={0}; x['a']=1,x['e']=1,x['i']=1,x['o']=1,x['u']=1; string s,s1; int t; cin>>t; cin.get(); for(int j=0;j<t;j++){ cin>>s; for(int i=0;i<s.size();i++){ if(x[s[i]]) s[i]-=32; else if(!x[s[i]+32]&&'A'<=s[i]&&s[i]<='Z') s[i]+=32; } s1 = s; cout<<s1<<endl; } return 0; }