import java.util.*;
public class lianxu{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
while(scan.hasNext()){
String str = scan.next();
ArrayList list = new ArrayList();
for(int i=0;i
for(int j=i+1;j
if(str.charAt(i)>='0'&&str.charAt(i)<='9'){
if(
str.charAt(j)>='0'&&str.charAt(j)<='9'){
if(j==str.length()-1){
list.add(str.substring(i, str.length()));
}
} else{
list.add(str.substring(i,j));
break;
}
}
else{
continue;
}
}
}
int max = 0;
for(int i=0;i
if(list.get(i).length()>max){
max=list.get(i).length();
}
}
StringBuilder sb = new StringBuilder();
for(int i=0;i
if(list.get(i).length()==max){
//System.out.println(list.get(i)+","+max);
sb.append(list.get(i));
}
}
System.out.println(sb+","+max);
}
}
}
}
这题太坑了,字符串长度一样的竟然同时输出