解法二:
(我的解法都是用最朴素的C语言写的,基本功)
include<stdio.h>
int main()
{
int a = 0;
int b = 0;
char ch = 0;
while (scanf("%c", &ch) != EOF)
{
if (ch == '0')
break;
if (ch == 'A')
a++;
if (ch == 'B')
b++;
}
if (a > b)
printf("A");
if(a<b)
printf("B");
if(a==b)
printf("E");
return 0;
}