問題一覧 > 通常問題

No.692 square1001 and Permutation 1

レベル : / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 256 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 520
作問者 : square1001 / テスター : ciel
お気に入りにしたユーザー ProblemId : 2124 / 自分の提出
問題文最終更新日: 2026-06-25 03:53:02
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 192 (順位表) の他の問題:

Problem Statement

There are $n$ Permutations in a basket. Petr and square1001 decide to play a game with them. The players alternately perform the following operation.

  • Take $1$ or more Permutations from the basket and eat all of the taken ones.

The player who eats the last Permutation loses, and that player's opponent wins.

Since square1001 has never beaten Petr in a Topcoder SRM, Petr moves first and square1001 moves second.

Determine which player wins when both players play optimally in order to win.

Input

$n$

Line $1$ contains an integer $n$, the number of Permutations.

Output

Print "Petr" if Petr wins this game, and "square1001" if square1001 wins this game.

Also, print a newline at the end.

Constraints

All input data satisfy the following constraints.

  • $1 \le n \le 10^9$.

Sample

Sample 1
Input
2
Output
Petr

If Petr first takes $1$ Permutation, the number of remaining Permutations becomes $1$. Then square1001 has no choice but to take the last Permutation, so square1001 loses; that is, Petr wins.

Sample 2
Input
1
Output
square1001

Since there is only $1$ Permutation, Petr, who moves first, has no choice but to take the first and last Permutation. Therefore, Petr loses and square1001 wins.

Sample 3
Input
20180125
Output
Petr

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