P22383 [CodeChef] ALBOFACE
提高-
题目描述

Read problem statements in [Mandarin], [Bengali], [Russian], and [Vietnamese] as well.

Alice and Bob have got an integer N. They decide to play a game. Alice and Bob make alternating moves: Alice makes the first move, Bob makes the second move, Alice makes the third one, and so on. The game continues until N becomes 0. The player who is unable to make a move loses.

During each turn a player can make one of the following moves:

  1. Choose an integer X such that X can be expressed as 2^{Y}, Y ≥ 1. The chosen X must also be a factor of N. After choosing an integer X which satisfies the mentioned criteria, the player will divide N by X.

  2. If Move 1 is not possible , the player will subtract 1 from N.

Predict the winner of the game if the game is played optimally by both the players.

------ Input Format ------

  • The first line of input contains a single integer T denoting the number of test cases. The description of T test cases follows.

  • The first line of each test case contains an integer N.

------ Output Format ------

For each test case, print "Alice" if Alice wins the game else print "Bob". Print the output without quotes.

------ Constraints ------

$1 ≤T ≤2*10^{5}$

$1 ≤N ≤10^{18} $

------ subtasks ------

10 points : $1 ≤ N ≤ 20$ , $1 ≤ T ≤ 20$
30 points : $1 ≤ N ≤ 10^{5}$, $1 ≤ T ≤ 10^{5}$
60 points : $1 ≤ N ≤ 10^{18}$

----- Sample Input 1 ------
2
1
2

----- Sample Output 1 ------
Alice
Bob
----- explanation 1 ------
Test case $1$: Alice can't perform the first move, hence she subtracts 1 from $N$ and $N$ becomes $0$. Bob can't make a move now.

Test case $1$: Alice first divides $N$ by $2$ , after which $N$ becomes $1$. Bob, in the next move decrements $N$ by $1$ after which $N$ becomes $0$ and Alice loses.

输入格式

见题面

输出格式

见题面

样例输入
2 1 2
样例输出
Alice Bob