QOJ.ac

QOJ

Límite de tiempo: 0.3 s Límite de memoria: 1024 MB Puntuación total: 100

#8508. 除法对决

Estadísticas

Intense Challenges Players Club (ICPC) 正在举办一场 DiviDuelo 锦标赛。

DiviDuelo 是一款全新的双人回合制游戏。在 DiviDuelo 中,首先选择一个数字 $N$,并写下它的所有约数。例如,如果选择了 $N = 10$,则写下的数字列表为 $1, 2, 5, 10$。玩家轮流从列表中选取一个尚未被选过的约数,直到所有约数都被选完。

胜负由先手玩家所选数字的最大公约数 (GCD) 决定。如果该 GCD 不等于 $1$,则先手玩家获胜。否则,如果 GCD 等于 $1$,则另一名玩家获胜。

ICPC 需要你的帮助来统计锦标赛中进行的比赛。给定 $N$ 的值,请判断在双方均采取最优策略的情况下,先手玩家是否能赢得比赛。

输入格式

输入包含一行,其中包含一个整数 $N$ ($1 \le N \le 10^{12}$),表示为游戏选择的数字。

输出格式

输出一行,如果先手玩家在双方均采取最优策略的情况下能赢得比赛,则输出大写字母 “Y”,否则输出大写字母 “N”。

样例

样例输入 1

10

样例输出 1

Y

样例输入 2

9

样例输出 2

N

样例输入 3

1

样例输出 3

N

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.