B. Road to Arabella

Codeforces
IDCF10226B
Time1000ms
Memory256MB
Difficulty
English · Original
Formal · Original
Ayoub and Kilani felt board while they are going to ArabellaCPC in (Amman-Irbid) road, so Kilani invented a new game to play with Ayoub. The game is described by the following rules : Ayoub picks a random integer $n$ $(1 <= n <= 10^9)$ , and Kilani picks a random integer $k$ $(1 <= k <= n)$, then they will start playing. In each turn a player can choose any number $x$ $(1 <= x <= m a x (1, m -k))$ (which $m$ is the current value of $n$) and subtract it from $n$. if $n$ equals zero then the player can't make a move. The player who can't make a move is considered to lose the game. If Kilani starts, and each player played optimally, who would be the winner? First line of input contains integer $T$ $(1 <= T <= 10^4)$ the number of test cases. Each one of next $T$ lines contains two integers $n$ and $k$, $(1 <= k <= n <= 10^9)$. print "Kilani" if he wins, and print "Ayoub" otherwise. (the output is case sensitive) ## Input First line of input contains integer $T$ $(1 <= T <= 10^4)$ the number of test cases.Each one of next $T$ lines contains two integers $n$ and $k$, $(1 <= k <= n <= 10^9)$. ## Output print "Kilani" if he wins, and print "Ayoub" otherwise. (the output is case sensitive) [samples]
**Definitions** Let $ n \in \mathbb{P} $ be a given prime number, where $ 2 \leq n \leq 10^7 $. Let $ \mathbb{P} $ denote the set of prime numbers. **Objective** Find $ a, b \in \mathbb{P} $ such that $ a + b = n $. If no such pair exists, output $-1$.
API Response (JSON)
{
  "problem": {
    "name": "B. Road to Arabella",
    "description": {
      "content": "Ayoub and Kilani felt board while they are going to ArabellaCPC in (Amman-Irbid) road, so Kilani invented a new game to play with Ayoub. The game is described by the following rules : Ayoub picks a ",
      "description_type": "Markdown"
    },
    "platform": "Codeforces",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "CF10226B"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "Ayoub and Kilani felt board while they are going to ArabellaCPC in (Amman-Irbid) road, so Kilani invented a new game to play with Ayoub.\n\nThe game is described by the following rules :\n\nAyoub picks a ...",
      "is_translate": false,
      "language": "English"
    },
    {
      "statement_type": "Markdown",
      "content": "**Definitions**  \nLet $ n \\in \\mathbb{P} $ be a given prime number, where $ 2 \\leq n \\leq 10^7 $.  \nLet $ \\mathbb{P} $ denote the set of prime numbers.\n\n**Objective**  \nFind $ a, b \\in \\mathbb{P} $ su...",
      "is_translate": false,
      "language": "Formal"
    }
  ]
}
Full JSON Raw Segments