7820 - 试题A:生存还是毁灭,这是一个问题 7’

通过次数

270

提交次数

437

时间限制 : 1 秒
内存限制 : 128 MB

对于给定的文章,求出出现频率最高的字母。

对于字母的出现频率,我们定义为:该字母在整个文章中出现的次数。

例如:“To be or not to be, that is the question!”

出现频率最高的字母是:t,总共出现了7次。

对于以下莎士比亚的《哈姆雷特》经典片段,你能帮JM找到出现频率最高的字母出现的次数吗?

输出出现频率最高的字母出现的次数。

注意:字母不区分大小写。

【答案提交】

这是一道结果填空的题,你只需要算出结果后提交即可。本题的结果为一个数字,在提交答案时只填写这个数字,填写多余的内容将无法得分。

 

  • Python语言选手

print("你的答案")

  • C/C++语言选手

#include <stdio.h>

int main()

{

printf("你的答案");

return 0;

}

  • Java语言选手

public class Main{
public static void main(String[] args){
System.out.println("你的答案");
}
}

输入

 

输出

 

样例

输入

To be, or not to be: that is the question,
Whether it's nobler in the mind to suffer
The slings and arrows of outrageous fortune,
Or to take arms against a sea of troubles,
And by opposing end them. To die,to sleep;
No more; and by a sleep to say we end
The heartache, and the thousand natural shocks
That flesh is heir to, it's a consummation
Devoutly to be wished. To die, to sleep.
To sleep, perchance to dream: ay, there's the rub;
For in that sleep of death what dreams may come
When we have shuffled off this mortal coil,
Must give us pause. There's the respect
That makes calamity of so long life;
For who would bear the whips and scorns of time,
The oppressor's wrong, the proud man's contumely,
The pangs of despised love, the law's delay,
The insolence of office, and the spurns
That patient merit of the unworthy takes,
When he himself might his quietus make
With a bare bodkin? Who would fardels bear,
To grunt and sweat under a weary life,
But that the dread of something after death,
The undiscovered country from whose bourn
No traveller returns, puzzles the will,
And makes us rather bear those ills we have
Than fly to others that we know not of?
Thus conscience does make cowards of us all,
And thus the native hue of resolution
Is sicklied or with the pale cast of thought,
And enterprises of great pith and moment
With this regard their currents turn awry
And lose the name of action.

输出


                            

来源

竞码编程-蓝桥杯模拟赛3(大学生组&青少年组)