| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 162166 | 罗钰帆 | 统计字符数量 | C++ | Accepted | 1 MS | 272 KB | 578 | 2026-10-15 19:34:36 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ char a[1001],s,x; int b[27]={0},d,max=-1; cin>>a; for(int i=0;a[i]!='\0';i++){ d=a[i]-'a'; b[d]++; } for(int i=0;i<26;i++){ if(b[i]>max){ max=b[i]; s=i+'a'; } } cout<<s<<" "<<max; return 0; }