問題一覧 > 通常問題

No.3300 Frog Game

レベル : / AI推定難易度 : 1350 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 67
作問者 : dyktr_06 / テスター : sepa38 くらげ Nafmo2 hanba-gu1
お気に入りにしたユーザー ProblemId : 12389 / 自分の提出
問題文最終更新日: 2025-10-04 23:05:31
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest MMA Contest 020 (順位表) の他の問題:

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もしくは右上の雲マークをクリックしてアカウントを作成してください。