| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 149805 | 周宸宇 | 统计字符数量 | C++ | Accepted | 1 MS | 276 KB | 498 | 2026-03-16 19:50:27 |
#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],c; cin>>a; int b[127]={},max=0; for(int i=0;a[i]!='\0';i++) b[a[i]]++; for(int i=1;i<127;i++){ if(b[i]>max){ max=b[i],c=char(i);} } cout<<c<<' '<<max; return 0; }