問題一覧 > 通常問題

No.2551 2, 3, 5, 7 Game

レベル : / AI推定難易度 : 1450 / 実行時間制限 : 1ケース 2.357秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 26
作問者 : dyktr_06 / テスター : sepa38 InTheBloom Seed57_cash ryota2357
お気に入りにしたユーザー ProblemId : 10246 / 自分の提出
問題文最終更新日: 2023-11-22 09:07:37
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
MMA Contest 017 (順位表) の他の問題:

Problem Statement

There is a number $X$, and sepa and ryota play a game using this number $X$.

Before the game starts, $X = 1$.

With sepa moving first and ryota moving second, they take turns repeating the following operation until the game ends.

  • The player whose turn it is chooses $1$ number from among $2, 3, 5, 7$. Letting $a$ be the chosen number, $X$ is changed to its value multiplied by $a$.

If $X$ becomes $N$ or greater after an operation, the game ends and the player who performed the last operation loses.

You are given $T$ values $N_i$. For each of them, determine who wins when both players act optimally.


Constraints

  • $1 \leq T \leq 2 \times 10^{5}$
  • $2 \leq N \leq 10^{16}$
  • All inputs are integers.

Input

The input is given from standard input in the following format.

$T$
$N_1$
$\vdots$

$N_T$

Output

Print sepa if sepa wins when both players act optimally, and ryota if ryota wins.

Sample

Sample 1
Input
3
11
2
2357
Output
sepa
ryota
sepa

For the first case, if sepa chooses $7$ first, sepa can always win no matter what operation ryota performs.

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。