#Q243. 「一本通 6.7 例 1」取石子游戏 1
「一本通 6.7 例 1」取石子游戏 1
Description
There is an interesting game played as follows:
Players: ;
Props: stones;
Rules:
- Players take turns to remove stones;
- Each player can take any number of stones between and (inclusive) in each turn;
- The game ends when all stones are taken;
- The player who takes the last stone wins.
Assuming both players are very smart, who will win the game?
Input Format
The input consists of a single line with two integers, and .
Output Format
Output a single integer: if the first player wins, or if the second player wins.
Sample 1
23 3
1
Constraints & Hints
For all test cases, .