Zoj Games Monthly Game

Source: Internet
Author: User

Help Bob Time limit: 2 Seconds Memory Limit: 65536 KB

There is a game very popular in Zju at present, Bob didn ' t meant to participate in it. But he decided to join it after discovering a lot of pretty girls playing it.

There is n stones on the ground and they is marked as 1 to n respectively. There'll is 2 players in each competition. And the game rules is simple, A and B take turns to move. Each round, one of the them can only take 1 number away, and then pick out all the divisors of the choosed number. When anyone away 1 number any longer, he'll fail the whole game.

Input

There is multiple cases. Each case has an integer number n (0≤ n ≤100).

Output

For each case, A win, output "win". If not, output "fail".

Sample INPUT1
34
Sample OUTPUT1
Win

Win

#include <cstdio> #include <algorithm>using namespace Std;int main () {    int n;    while (scanf ("%d", &n)!=eof)    {        if (n==0) printf ("fail\n");        else printf ("win\n");    }    return 0;}


Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Zoj Games Monthly Game

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.