No.1314 Don't Say N Game (5)
Problem Statement
You and Grant are playing the so-called "Don't Say 21 Game" (in some places also called the stick-taking game).
Extending the rules, consider the following game using positive integers $N$ and $K$.
1. First, the player moving first is given 0.
2. From there, the player adds one of the integers from $1$ to $K$ to the given integer, declares the result, and passes it to the opposing player, trying not to declare a number that is $N$ or greater (declaring such a number loses the game).
3. The players take turns repeating 2. until the game is decided.
It is known that once $N$ and $K$ are fixed, it can be determined which of the first player and the second player wins this game.
Now, the games will be played under the following rules.
$M$ and $K$ are given.
Initially, there is a sequence containing each integer from $2$ to $M$ exactly $1$ time.
First, you start the game as the first player.
The first player chooses $1$ number from the sequence as the $N$ to be used this time, and the game is played using the chosen $N$ and the given $K$.
The $2$ players take this game seriously, so neither of them will deliberately lose a game they can win.
From game $2$ onward, the player who lost the previous game plays as the first player.
The number chosen as $N$ is removed from the sequence.
This is repeated until the sequence becomes empty.
When both you and Grant play so as to win as many times as possible, determine which of you has more wins.
Input
$M\ K$
$M$ and $K$ are given, separated by a space.
All inputs are integers.
$2 \le M,K \le 10^9$
Output
Output "Win" if you have more wins, "Lose" if you have fewer wins, and "Draw" if the numbers of wins are equal.
Sample
Sample 1
Input
2 2
Output
Win
Sample 2
Input
3 10
Output
Draw
Sample 3
Input
10 5
Output
Lose
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
ei1333333