当前位置:网站首页>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
边栏推荐
- 孙宇晨式“溢价逻辑”:不局限眼前,为全人类的“星辰大海”大胆下注
- 夏季整治百日行动进行时:700余交通安全隐患被揪出
- 图新地球为什么很模糊,白球、看图、下载问题深度剖析
- 如何通过DBeaver 连接 TDengine?
- 进入 SQL Client 创建 table 后,在另外一个节点进入 SQL Client 查询不到
- 【AppCube】数字孪生万物可视 | 联接现实世界与数字空间
- Machine Learning Overview
- Mysql OCP 73 questions
- Regulation action for one hundred days during the summer, more than 700 traffic safety hidden dangers were thrown out
- LeetCode_二分搜索_简单_367.有效的完全平方数
猜你喜欢
后台图库上传功能
被审稿人吐槽没有novelty!深度学习方向怎么找创新点?
三大产品力赋能欧萌达OMODA5
Who is more popular for hybrid products, depending on technology or market?
二叉搜索树(搜索二叉树)模拟实现(有递归版本)
Spinner文字显示不全解决办法
This article understands the process from RS485 sensor to IoT gateway to cloud platform
LeetCode_多叉树_中等_429.N 叉树的层序遍历
成为优秀架构师必备技能:怎样才能画出让所有人赞不绝口的系统架构图?秘诀是什么?快来打开这篇文章看看吧!...
QT with OpenGL(HDR)
随机推荐
苏州大学:从PostgreSQL到TDengine
浪潮—英伟达打造元宇宙新方案,虚拟人的故事将再破你的认知
在 Chrome 开发者工具里通过 network 选项模拟网站的离线访问模式
分辨率_分辨率越高越好?手机屏幕分辨率多少才合适?现在终于搞清楚了[通俗易懂]
What is the IDE?Novice with which the IDE is better?
有大佬用flink读取mysql binlog分表后再写入新表吗
数字藏品和ICP
按位取反怎么运算_按位取反运算
安全研究员:大量Solana钱包被盗
Mysql OCP 73 questions
GBase 8c分布式数据库,数据如何分布最优?
图新地球为什么很模糊,白球、看图、下载问题深度剖析
鸿蒙第三次
白帽黑客与留守儿童破壁对“画”!ISC、中国光华科技基金会、光明网携手启动数字安全元宇宙公益展
【学习笔记之菜Dog学C】通讯录
完全背包问题的思路解析
OPENCV学习DAY7
优炫数据库在linux平台下服务启动失败的原因
对话 | AI、机器学习在材料科学研究中能发挥哪些作用?
ScrollView嵌套RecyclerView滚动冲突