No.3300 Frog Game
Problem Statement
There are $10^{100}$ scaffolds, numbered $1, 2, \ldots ,10^{100}$ in order. A frog is on scaffold $1$.
sepa and ryota play a game.
With sepa moving first and ryota moving second, they alternately repeat the following operation.
- When the frog is on scaffold $i$, move it to scaffold $i + A$ or $i + B$.
If the frog is moved to a scaffold $k$ satisfying $N \leq k$, the player who made that move loses, and the game ends.
Determine who wins the game when both players act optimally.
Constraints
- $2 \leq N \leq 10^{18}$
- $1 \leq A < B \leq 10^{18}$
- All inputs are integers.
Input
The input is given from standard input in the following format.
$N$ $A$ $B$
Output
Print sepa if sepa wins when both players act optimally, and ryota if ryota wins.
Sample
Sample 1
Input
6 2 3
Output
sepa
If sepa first moves the frog from scaffold $1$ to scaffold $4$, sepa can always win no matter what operation ryota performs.
Sample 2
Input
1000000000000 38 2357
Output
ryota
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
sepa38
くらげ