| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 164190 | 何兴驰 | 统计字符数量 | C++ | Accepted | 1 MS | 272 KB | 284 | 2026-11-01 11:30:03 |
#include<bits/stdc++.h> using namespace std; int a[27],i,y; int main(){ string s; cin>>s; while(s[i]!='\0'){ y=s[i]; a[int(y-97)]++; i++; } int max=0,n; for(int i=0;i<=25;i++){ if(max<a[i]){ n=i+97; max=a[i]; } } cout<<char(n)<<" "<<max; }