| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 150870 | 李亭绪 | 统计字符数量 | C++ | Runtime Error | 1 MS | 276 KB | 527 | 2026-04-01 19:55:43 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<string> #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int s[124],ma=-1,max; char a[1000]; cin>>a; for(int i=0;a[i]!='\0';i++){ if(a[i]>93&&a[i]<123){ s[i]++; } for(int i=94;i<=123;i++) { if(s[i]>ma) ma=s[i]; max=i; } } cout<<char(max-1)<<' '<<s[ma]; }
Runtime Error:Segmentation fault