#abc368f. F - Dividing Game
F - Dividing Game
Score : points
问题陈述
你得到了一个由 个正整数组成的序列 ,其中每个元素至少为 。安娜和布鲁诺使用这些整数进行游戏。他们轮流进行,安娜先开始,执行以下操作:
- 自由选择一个整数 。然后,自由选择一个正除数 ,该除数不是 本身,并将 替换为 。
无法执行操作的玩家输掉游戏,另一个玩家获胜。假设两位玩家都为了胜利而进行最优策略,确定谁将获胜。
以上为大语言模型 kimi 翻译,仅供参考。
Problem Statement
You are given a sequence of positive integers , where each element is at least . Anna and Bruno play a game using these integers. They take turns, with Anna going first, performing the following operation.
- Choose an integer freely. Then, freely choose a positive divisor of that is not itself, and replace with .
The player who cannot perform the operation loses, and the other player wins. Determine who wins assuming both players play optimally for victory.
Constraints
- All input values are integers.
Input
The input is given from Standard Input in the following format:
Output
Print Anna
if Anna wins the game, and Bruno
if Bruno wins.
Sample Input 1
3
2 3 4
Sample Output 1
Anna
For example, the game might proceed as follows. Note that this example may not necessarily represent optimal play by both players:
- Anna changes to .
- Bruno changes to .
- Anna changes to .
- Bruno changes to .
- Anna cannot operate on her turn, so Bruno wins.
Actually, for this sample, Anna always wins if she plays optimally.
Sample Input 2
4
2 3 4 6
Sample Output 2
Bruno