AcWing 3694. A还是B Posted on 2021-06-20 Edited on 2024-11-24 In AcWing 1234567891011121314#include <iostream>using namespace std;char c;int n, a, b;int main() { cin >> n; a = 0, b = 0; for (int i = 0; i < n; ++i) { cin >> c; if (c == 'A') a++; else b++; } cout << (a == b ? "T" : (a > b ? "A" : "B")) << endl;}