当前位置:网站首页>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
边栏推荐
猜你喜欢
随机推荐
Leecode-SQL 1527. 模糊查询匹配(模糊查询用法)
创建C UDR时,指定的HANDLESNULLS的作用是什么?
Boolean 与numeric 无法互转
Win10/11 删除文件资源管理器左侧栏目文件夹
ScrollView嵌套RecyclerView滚动冲突
for in 和 for of的区别
三大产品力赋能欧萌达OMODA5
SAP 电商云 Spartacus UI 的 External Routes 设计明细
成为优秀架构师必备技能:怎样才能画出让所有人赞不绝口的系统架构图?秘诀是什么?快来打开这篇文章看看吧!...
安全研究员:大量Solana钱包被盗
servlet生命周期详解--【结合源码】
Mysql OCP 72题
如何改变sys_guid() 返回值类型
【Star项目】小帽飞机大战(九)
MATLAB Programming and Applications 2.6 Strings
巴比特 | 元宇宙每日必读:玩家离场,平台关停,数字藏品市场正逐渐降温,行业的未来究竟在哪里?...
Mysql OCP 73 questions
MySQL binlog的这种时间怎么处理呢??
问下flink -sql 通过cdc抽取数据怎么能更快的抽取数据写到目标端?如何配置?
MySQL数据库实战(1)









