#include <iostream>
#include <cstdio>
#include <cstring>
#include <vector>
using namespace std;
int ce(string str)
{
int count = 0;
for (int i = 0; i < str.length(); i++)
{
if (str[i] == ‘e‘)
count++;
}
//cout << count << endl;计算e的个数
return count;
}
int main()
{
int maxe = 0;
string maxstr;
string str;
cin >> str;
string ss[25];
int s = 0;
while (str != "#")
{
if (ce(str) > maxe)
{
maxe=ce(str);
s = 0;
ss[s++] = str;
//cout<<"new"<<endl;
}
else if (ce(str) == maxe)
{
ss[s++] = str;ji
//cout<<‘=‘<<endl;
}
cin >> str;
}
for (int i = 0; i < s; i++)
cout << ss[i] << endl;
return 0;
}
相关文章
- 01-09python37实现1-统计文本中出现次数最多的单词
- 01-09Python每日一练(1):计算文件夹内各个文章中出现次数最多的单词
- 01-09一篇英文文档中找出频数最多的10个单词
- 01-09含e最多的单词
- 01-09LeetCode2114句子中的最多单词数
- 01-09问题-栈S最多能容纳4个元素,现有6个元素按A、B、C、D、E、F顺序进栈,问可能的出栈顺序。
- 01-09[No00003E]26个字母暗藏的单词秘密
- 01-09sort +awk+uniq 统计文件中出现次数最多的前10个单词
- 01-09转载:Linux命令经典面试题:统计文件中出现次数最多的前10个单词
- 01-09朱晔和你聊Spring系列S1E8:凑活着用的Spring Cloud(含一个实际业务贯穿所有组件的完整例子)