import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc=new Scanner(System.in); char[]c=sc.next().toCharArray(); int cnt=1; char index=c[0]; int maxCnt=0; for (int i = 1; i < c.length; i++) { if(c[i]==c[i-1])cnt++; else { if(cnt>maxCnt){ maxCnt=cnt; index=c[i-1]; } cnt=1; } if(i==c.length-1){ if(cnt>maxCnt){ maxCnt=cnt; index=c[i-1]; } } } System.out.println(index+" "+maxCnt); } }
0.0分
0 人评分