import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String str = sc.next();
int counta = 0;
int countb = 0;
for(int i = 0 ; i < str.length() ; i++) {
if(str.charAt(i) == 'A') {
counta++;
} else if(str.charAt(i) == 'B') {
countb++;
}
}
if(counta > countb) {
System.out.println("A");
} else if(counta == countb) {
System.out.println("E");
} else {
System.out.println("B");
}
}
}
牛客网 编程初学者入门训练 BC40 竞选社长 Java
最新推荐文章于 2024-10-30 18:07:32 发布