QOJ.ac

QOJ

Time Limit: 1 s Memory Limit: 512 MB Total points: 100

#14063. 手风琴

Statistics

Jay 和 Bob 有一个装有 $N$ 张卡片的袋子。

你觉得卡片上写着什么?

每张卡片上都写着一个笑话。

你觉得这两个家伙打算做什么?

Jay 阅读不少于一张且不多于 $K$ 张写有笑话的卡片,然后把它们全部扔掉。之后,Bob 阅读不少于一张且不多于 Jay 在上一步中阅读的卡片数量的写有笑话的卡片,并把它们全部扔掉。

你知道之后会发生什么吗?

没错!Jay 阅读不少于一张且不多于 Bob 在上一步中阅读的卡片数量的写有笑话的卡片,并把它们全部扔掉。以此类推,直到没有写有笑话的卡片剩下。

谁是赢家?

当然,读到最后一个笑话的人是赢家,因为“谁笑到最后,谁笑得最好”。

你需要判断赢家是 Jay 还是 Bob(假设两个人都想赢,并且他们都会尽一切可能让自己笑到最后)。

输入格式

输入包含两个整数 $N$ 和 $K$($1 \le K \le N \le 10^5$)。

输出格式

如果赢家是 Jay,在第一行输出 "WIN",在第二行输出 Jay 在第一步必须阅读的笑话数量。如果有多个可能的答案,输出其中任意一个。

如果赢家是 Bob,输出 "FAIL"。

样例

输入样例 1

1 1

输出样例 1

WIN
1

输入样例 2

2 1

输出样例 2

FAIL

输入样例 3

6 3

输出样例 3

WIN
2

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.