hdu 2897 邂逅明下 (巴什博弈)

 

 

#include<cmath>
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
    int n,p,q;
    int i,j,k;
    while(scanf("%d%d%d",&n,&p,&q)!=EOF)
    {
        if(n%(p+q)<=p&&n%(p+q)!=0)
        {
            printf("LOST\n");
        }
        else printf("WIN\n");
    }
    return 0;
}

 

posted @ 2015-08-19 21:50  sola94  阅读(144)  评论(0编辑  收藏  举报