delete pics to save space
This commit is contained in:
13
history_source/信息学奥赛一本通/2.2.12.cpp
Normal file
13
history_source/信息学奥赛一本通/2.2.12.cpp
Normal file
@ -0,0 +1,13 @@
|
||||
#include<cstdio>
|
||||
using namespace std;
|
||||
int main()
|
||||
{
|
||||
int le[26]={0};
|
||||
char x;
|
||||
while(x=getchar(),x!='\n') le[x-'a']++;
|
||||
int ans=0;
|
||||
for(int i=1;i<26;i++) if(le[i]>le[ans]) ans=i;
|
||||
printf("%c %d\n",ans+'a',le[ans]);
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user