题解 | #完美成绩#
竞选社长
http://www.nowcoder.com/practice/45a30e3ef51040ed8a7674984d6d1553
import java.util.Scanner;
public class Main{
public static void main(String []args){
Scanner sc = new Scanner(System.in);
String s = sc.nextLine();
int n = s.length();
int a = 0;
int b = 0;
for(int i=0;i<n;i++){
if(s.charAt(i)=='A'){
a++;
}
if(s.charAt(i)=='B'){
b++;
}
}
if(a>b){
System.out.print("A");
}
else if(a<b){
System.out.print("B");
}
else{
System.out.print("E");
}
}
}