#include<iostream>
#include<cstring>
#include<algorithm>
using namespace std;
bool pd(char c){
return (c=='A')||(c=='E')||(c=='I')||(c=='O')||(c=='U') ||(c=='Y')||(!c);
}
int main(){
char s[1000];
scanf("%s",s);
int re=0;
int k=-1;
for(int i=0;i<=strlen(s);i++){
if(pd(s[i]))
re = max(re,i-k),k=i;
}
cout<<re<<endl;
}
Codeforces733A - Grasshopper And the String
最新推荐文章于 2020-09-04 19:37:50 发布