Run ID:164190

提交时间: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; }