Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
151645 Kevin 元音字母转换 C++ Accepted 2 MS 280 KB 488 2026-04-16 10:47:49

Tests(1/1):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ string a; int t; cin>>t; for(int i=1;i<=t;i++){ cin>>a; int len=a.size(); for(int j=0;j<len;j++){ if(a[j]>='a'&&a[j]<='z'){ if(a[j]=='a'||a[j]=='e'||a[j]=='i'||a[j]=='o'||a[j]=='u'){ a[j]=a[j]-32; } } else{ if(a[j]=='A'||a[j]=='E'||a[j]=='I'||a[j]=='O'||a[j]=='U'){ continue; } else{ a[j]=a[j]+32; } } } cout<<a<<endl; } return 0; }