22697_FunnyGame

2022-5-16 18:22| 发布者: Hocassian| 查看: 21| 评论: 0|原作者: 肇庆学院ACM合集

摘要:
C:\Users\Administrator\Downloads\2019-10-12-10-14-5-89506866232900-Problem List-采集的数据-后羿采集器.html

Pro.ID

22697

Title

Funny Game

Title链接

http://10.20.2.8/oj/exercise/problem?problem_id=22697

AC

0

Submit

0

Ratio

-

时间&空间限制

  • Time Limit: 2000/1000 MS (Java/Others)     Memory Limit: 65536/65536 K (Java/Others)
  • 描述

    All of you are familiar with Alice and Bob, the smart girl and the silly boy. They always play games together. And this time, Bob will play first. So the title of this problem is Bob and Alice, but not Alice and Bob.

    Here are the rules of the new game:

    (1) There are N stones at first;

    (2) Bob and Alice take turns to remove stones. Each time, they can remove pk stones, p is prime number, such as 2, 3, 5, ... and k is any non-negative integer.

    (3) The one who removes the last stone wins the game.

    You have to tell Bob, if both Alice and Bob play perfectly, who will win the game.

    输入

    The first line of the input is a positive integer T. T is the number of the test cases followed. Each test case contains an integer N ( 1 < N < 1 000 000 ) which is the number of the stones at the very beginning. There may be one or several spaces before or after the integer.

    输出

    Description

    All of you are familiar with Alice and Bob, the smart girl and the silly boy. They always play games together. And this time, Bob will play first. So the title of this problem is Bob and Alice, but not Alice and Bob.

    Here are the rules of the new game:

    (1) There are N stones at first;

    (2) Bob and Alice take turns to remove stones. Each time, they can remove pk stones, p is prime number, such as 2, 3, 5, ... and k is any non-negative integer.

    (3) The one who removes the last stone wins the game.

    You have to tell Bob, if both Alice and Bob play perfectly, who will win the game.

    Input

    The first line of the input is a positive integer T. T is the number of the test cases followed. Each test case contains an integer N ( 1 < N < 1 000 000 ) which is the number of the stones at the very beginning. There may be one or several spaces before or after the integer.

    Output

    The output of the program should consist of one line of output for each test case.

    The output of each test case only contains the name of the winner: "Bob" or "Alice". No any redundant spaces is needed.

    Sample Input

    2
    5
    6

    Sample Output

    Bob
    Alice

    Source

    样例输入

    2
    5
    6

    样例输出

    Bob
    Alice

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部