题解 | #竞选社长#
竞选社长
http://www.nowcoder.com/practice/45a30e3ef51040ed8a7674984d6d1553
int main() {
char n;
int a = 0, b = 0;
while (scanf("%c", &n) != EOF) {
if (n == '0') break;
if (n == 'A') a++;
else b++;
}
if (a > b) printf("A");
else if (a < b) printf("B");
else printf("E");
return 0;
}