当前位置:网站首页>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
边栏推荐
猜你喜欢
随机推荐
LeetCode_多叉树_中等_429.N 叉树的层序遍历
安全研究员:大量Solana钱包被盗
对话 | AI、机器学习在材料科学研究中能发挥哪些作用?
被审稿人吐槽没有novelty!深度学习方向怎么找创新点?
成为优秀架构师必备技能:怎样才能画出让所有人赞不绝口的系统架构图?秘诀是什么?快来打开这篇文章看看吧!...
BPMN和DMN基本概念和使用案例
for in 和 for of的区别
Leecode-SQL 1527. 模糊查询匹配(模糊查询用法)
如何通过DBeaver 连接 TDengine?
在 Chrome 开发者工具里通过 network 选项模拟网站的离线访问模式
MySQL数据库基本使用
ECCV2022 | RU&谷歌:用CLIP进行zero-shot目标检测!
Leecode-SQL 1667. 修复表中的名字
成对连接点云分割
Mysql OCP 72 questions
消费者认可度较高 地理标志农产品为啥“香”
深度学习100例——卷积神经网络(CNN)实现服装图像分类
gbase在轨道交通一般都采用哪种高可用架构?
浪潮—英伟达打造元宇宙新方案,虚拟人的故事将再破你的认知
科普大佬说 | 黑客帝国与6G有什么关系?