| ps | |
|---|---|
| 링크 | acmicpc.net/… |
| 출처 | BOJ |
| 문제 번호 | 31648 |
| 문제명 | Palindrome Game |
| 레벨 | 골드 5 |
| 분류 |
게임 이론 |
| 시간복잡도 | O(T) |
| 인풋사이즈 | T<=10 |
| 사용한 언어 | Python 3.11 |
| 제출기록 | 31120KB / 44ms |
| 최고기록 | 44ms |
| 해결날짜 | 2024/03/26 |
"""Solution code for "BOJ 31648. Palindrome Game".
- Problem link: https://www.acmicpc.net/problem/31648
- Solution link: http://www.teferi.net/ps/problems/boj/31648
Tags: [game theory]
"""
import sys
def main():
T = int(sys.stdin.readline())
for _ in range(T):
S = sys.stdin.readline().rstrip()
print('E' if S[-1] == '0' else 'B')
if __name__ == '__main__':
main()