| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 149804 | 王奕杰 | 统计字符数量 | C++ | Time Limit Exceeded | 1000 MS | 268 KB | 499 | 2026-03-16 19:42:30 |
#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[27]={},max=0; for(int i=0;a[i]!='\0';i++){ a[i-'a']++; } for(int i=1;a[i]!='\0';){ if(b[a[i]-'a']>max) max=b[a[i]-'a'],c=a[i]; } cout<<c<<" "<<max; return 0; }