当前位置:网站首页>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
边栏推荐
猜你喜欢
随机推荐
嵌入式软件组件经典架构与存储器分类
像用户体验设计师一样思考
多态详细讲解(简单实现买票系统模拟,覆盖/重定义,多态原理,虚表)
如何通过DBeaver 连接 TDengine?
夏季整治百日行动进行时:700余交通安全隐患被揪出
后台图库上传功能
安全研究员:大量Solana钱包被盗
Regulation action for one hundred days during the summer, more than 700 traffic safety hidden dangers were thrown out
Mysql 主从复制 作用和原理
error C2872: “flann”: 不明确的符号 解决方法
Scapy的介绍(一)「建议收藏」
MySQL binlog的这种时间怎么处理呢??
Win10/11 删除文件资源管理器左侧栏目文件夹
type="module" you know, but type="importmap" you know
GoogLeNet系列解读「建议收藏」
优炫数据库在linux平台下服务启动失败的原因
oracle计算同、环比
QT with OpenGL(HDR)
鸿蒙第四次
关于OPENSSL的问题