题解 | 竞选社长 STL库最简写法
竞选社长
https://www.nowcoder.com/practice/45a30e3ef51040ed8a7674984d6d1553
#include <algorithm>
#include <iostream>
using namespace std;
int main() {
string s;cin>>s;
int a = count(s.begin(), s.end(), 'A');
int b = count(s.begin(), s.end(), 'B');
if(a == b) cout<<'E';
else cout<<(a > b ? 'A' : 'B');
}
// 64 位输出请用 printf("%lld")

