| IPL 2026 |
|---|
| Закончено |
Alice and Bob are playing a game with a pile of $$$n$$$ stones.
They alternate turns removing stones from the pile, with Alice moving first. On her first turn, Alice must remove between $$$1$$$ and $$$k$$$ stones (inclusive).
On subsequent turns, if the previous player removed exactly $$$x$$$ stones, the next player must remove between $$$1$$$ and $$$x$$$ stones (inclusive).
The player who removes the last stone wins. Determine who wins if both players play optimally.
Each test contains multiple test cases. The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 10^5$$$). The description of the test cases follows.
The only line of each test case contains two integers $$$n$$$ and $$$k$$$ ($$$1\le k\le n\le 10^{18}$$$) — the initial number of stones and the maximum number of stones Alice may remove on her first turn.
For each test case, output the winner if both players play optimally.
66 16 212 312 467676767676768 167676767676769 67676767676768
BobAliceBobAliceBobAlice
| Название |
|---|


