#CF1926A. Vlad and the Best of Five

    ID: 6878 传统题 1000ms 256MiB 尝试: 2 已通过: 1 难度: 10 上传者: 标签>模拟CodeforcesCodeforces Round 928(Div4)Div4ACF1926A800

Vlad and the Best of Five

题目描述

Vladislav 有一个长度为 55 的字符串,该字符串中的每个字符都是 A\texttt{A}B\texttt{B}

请问哪一个字母出现的次数更多:A\texttt{A} 还是 B\texttt{B}

输入格式

输入的第一行包含一个整数 tt1t321 \leq t \leq 32),表示测试用例的数量。

每个测试用例的唯一一行包含一个长度为 55 的字符串,字符串仅由字母 A\texttt{A}B\texttt{B} 组成。

同一组测试中的 tt 个字符串均不相同。

输出格式

对于每个测试用例,输出一个字母(A\texttt{A}B\texttt{B}),表示在该字符串中出现次数最多的字符。

样例

8
ABABB
ABABA
BBBAB
AAAAA
BBBBB
BABAA
AAAAB
BAAAA
B
A
B
A
B
A
A
A

样例说明

由 ChatGPT 4.1 翻译

来源

Codeforces 1926A,英文题名 Vlad and the Best of Five。