#include<bits/stdc++.h>
using namespace std;
int main()
{
char str[105];
cin>>str;
int len=strlen(str);
for(int i=len-1;i>=0;i--)
str[i+1]=str[i];
int step=0,max1=0,now;
for(int i=1;i<=len;i++)
{
if(str[i]=='A'||str[i]=='E'||str[i]=='I'||str[i]=='O'||str[i]=='U'||str[i]=='Y')
{
now=i-step;
step=i;
max1=max(max1,now);
}
}
now=len-step+1;
max1=max(max1,now);
cout<<max1<<endl;
return 0;
}
733A Grasshopper And the String codeforces(水题)
最新推荐文章于 2018-05-24 16:25:35 发布