竞选社长
竞选社长
http://www.nowcoder.com/questionTerminal/45a30e3ef51040ed8a7674984d6d1553
public class Main{
public static void main(String[] Args) throws Exception{
int ch;
int a=0;
int b=0;
while((ch=System.in.read())!='0'){
if((char)ch=='A') a++;
if((char)ch=='B') b++;
}
System.in.read();
System.out.println(a==b?'E':a>b?'A':'B');
}
}