Run ID:155400

提交时间:2026-06-07 11:29:48

#include<bits/stdc++.h> using namespace std; int main(){ char z[27]={}; int sum[1001]={},max=0; cin>>z; int i=0; while(z[i]!='\0'){ sum[z[i]]++; if(max<sum[z[i]])mas=sum[z[i]]; i++; } for(char s='a';s<='z';c++){ if(max==sum[s]){ cout<<s<<' '<<max<<endl; break; } } return 0; }