AC

せいしゅん404  •  1个月前


include

include

using namespace std;

int main(void){

string s;
int len,l=-1,ans=0;
cin>>s;
len=s.size();
for(int i=0;i<len;i++){
	if(s[i]=='A'||s[i]=='E'||s[i]=='I'||s[i]=='O'||s[i]=='U'||s[i]=='Y'){
		ans=max(i-l,ans);
		l=i;
	}
}
ans=max(len-l,ans);
cout<<ans<<endl;
return 0;

}


Comments:

请先登录,才能进行评论