| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 82063 | 杜奕辰 | 统计字符数量 | C++ | Accepted | 1 MS | 276 KB | 364 | 2024-07-12 17:00:31 |
#include<bits/stdc++.h> using namespace std; char n[1000000]; int n2[150]; int main() { cin>>n; int n3=strlen(n); for(int i=0; i<n3; i++) { n2[n[i]]++; } int max=0,k; for(int j='a'; j<='z'; j++) { if(max<n2[j]){ max=n2[j]; k=j; } } cout<<char(k)<<" "<<max; return 0; }