题解 | 删得回文串
删得回文串
https://www.nowcoder.com/practice/5bbf3f6b59be406085c055f6eb316528
from collections import Counter s = input().strip() counter = Counter(s) # 统计出现奇数次的字符数量 odd_count = sum(1 for count in counter.values() if count % 2 == 1) # 判断胜者 if odd_count == 0 or odd_count % 2 == 1: print("Alice") else: print("Bob")