当前位置:网站首页>Question G: Word Analysis ← Questions for the second provincial competition of the 11th Blue Bridge Cup Competition
Question G: Word Analysis ← Questions for the second provincial competition of the 11th Blue Bridge Cup Competition
2022-08-03 10:49:00 【hnjzsyjyj】
[Problem Description]
Xiao Lan is learning a magical language, the words in this language are all written in lowercase EnglishMade up of letters, some words are very long, far exceeding the length of normal English words.Xiaolan has been learning for a long time and can't remember some words. He plans to stop memorizing these words completely, but to distinguish words according to which letter in the word appears the most.
Now, please help Xiao Lan. After giving a word, help him find the letter that appears the most and the number of times that letter appears.
[Input Format]
The input line contains one word, and the word consists of lowercase English letters only.
[Output format]
The output consists of two lines, the first line contains an English letter, which indicates which letter appears the largest in the word, if there are multiple letters appearingThe number of times is equal, and the one with the smallest dictionary sequence is output.
[Algorithm Code One]
#include using namespace std;int num[27];int main() {string s;cin>>s;for(int i=0; i
[Algorithm code 2]
#include using namespace std;const int maxn=1005;int num[maxn];int main() {string s;cin>>s;for(int i=0; i
[References]
https://blog.csdn.net/qq_20144897/article/details/122956448
边栏推荐
- Guys, I have a problem: My source mysql has a table that has been writing to, I use mysql cdc connec
- 阿里本地生活全域日志平台 Xlog 的思考与实践
- 面试官:工作两年了,这么简单的算法题你都不会?
- Leecode-SQL 1484. 按日期分组销售产品
- Apache Doris系列之:数据模型
- json格式的字符串是什么类型的_输入字符串的格式要求
- With strong network, China mobile to calculate excitation surging energy network construction
- 完全背包问题的思路解析
- MATLAB程序设计与应用 2.7 结构数据与单元数据
- VL53L0X V2 laser ranging sensor collects distance data serial output
猜你喜欢
随机推荐
被审稿人吐槽没有novelty!深度学习方向怎么找创新点?
图新地球为什么很模糊,白球、看图、下载问题深度剖析
机器学习(公式推导与代码实现)--sklearn机器学习库
袋鼠云思枢:数驹 DTengine,助力企业构建高效的流批一体数据湖计算平台
面试一面
如何检索IDC研究报告?
通过GBase 8c Platform安装数据库集群时报错
BPMN和DMN基本概念和使用案例
白帽黑客与留守儿童破壁对“画”!ISC、中国光华科技基金会、光明网携手启动数字安全元宇宙公益展
type=“module“ 你了解,但 type=“importmap“ 你知道吗
LeetCode_二分搜索_简单_367.有效的完全平方数
OPENCV学习DAY7
消费者认可度较高 地理标志农产品为啥“香”
QSplitter(分离部件)
go——并发编程
面试官:工作两年了,这么简单的算法题你都不会?
鸿蒙第三次
error C2872: “flann”: 不明确的符号 解决方法
Win10/11 删除文件资源管理器左侧栏目文件夹
嵌入式软件组件经典架构与存储器分类









