Muallif: PhD admin

Blackboard Game

Xotira 64mb Vaqt 2000ms Qiyinchiligi 37%

Initially, the integers from $0$ to $n-1$ are written on a blackboard.

In one round,

  • Alice chooses an integer $a$ on the blackboard and erases it;
  • Then Bob chooses an integer $b$ on the blackboard such that $a+b \equiv 3 \pmod 4$ and erases it.

Rounds take place in succession until a player is unable to make a move $-$ the first player who is unable to make a move loses. Determine who wins with optimal play.
 


Kiruvchi ma'lumotlar:

The first line contains an integer $t$ ($1 \leq t \leq 100$) $-$ the number of test cases.

The only line of each test case contains an integer $n$ ($1\leq n \leq 100$) $-$ the number of integers written on the blackboard.


Chiquvchi ma'lumotlar:

For each test case, output on a single line $Alice$ if Alice wins with optimal play, and $Bob$ if Bob wins with optimal play.

You can output the answer in any case (upper or lower). For example, the strings $aLiCe$, $alice$, $ALICE$, and $alICE$ will be recognized as $Alice$.

Misollar:
# Input.txt Output.txt
1
2 3
5
2
-2 7
5
Izoh:

In the first sample, suppose Alice chooses $0$, then Bob cannot choose any number so Alice wins immediately.

In the second sample, suppose Alice chooses $0$, then Bob can choose $3$. Then suppose Alice chooses $2$, then Bob can choose $1$. Then Alice has no numbers remaining, so Bob wins.

Yechimini yuborish

Masalani yechish uchun tizimga kiring yoki ro'yxatdan o'ting.

Theme Builder

Choose the color mode for your app.

The perfect color mode for your app.

Choose the font family that fits your app.

Choose the gray shade for your app.

Choose the border radius factor for your app.