zoj4105 Abbreviation

题目链接:https://zoj.pintia.cn/problem-sets/91827364500/problems/91827370500

Name Result Time(ms) Memory(KB)
0 Accepted 5 448

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <iostream>
using namespace std;
int main() {
int T;
string arr = "0aeiyou";
cin>>T;
string str;
while (T--){
cin>>str;
string res="";
res+=str[0];
for (int i = 1; i < str.length(); ++i) {
if(arr.find(str[i]) == string::npos){
res+=str[i];
}
}
cout<<res<<endl;
}
return 0;
}


zoj4105 Abbreviation
https://pisces34.github.io/2021/06/19/zoj/zoj4105/
发布于
2021年6月19日
许可协议