Run ID:155402

提交时间:2026-06-07 11:30:20

#include<iostream> using namespace std; int main(){ char t[27]={}; int i=0,sum[]={},max=0; cin>>t; while(t[i]!='\0'){ sum[t[i]]++; if(max<sum[t[i]])max=sum[t[i]]; i++; } for(char c='a';c<+'z';c++){ if(max=sum[c]){ cout<<c<<' '<<max; break; } } return 0; }