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
WinWin
#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