Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
41808 Songgy_King 蚱蜢跳跃 C++ 解答错误 0 MS 256 KB 444 2024-02-23 11:54:30

Tests(0/1):


#include<bits/stdc++.h> using namespace std; int main() { string str; getline(cin,str); int minn=-1,temp,last=0; bool flag=true; for(int i=0;i<str.size();i++){ if(str[i]=='A'||str[i]=='E'||str[i]=='I'||str[i]=='O'||str[i]=='U'||'/0'){ flag=true; temp=i-last; if(temp>minn) minn=temp; last=i; } } if(flag) cout<<minn<<endl; else cout<<str.size()+1<<endl; return 0; }


测评信息: