首页 > 代码库 > hdu1849

hdu1849

Nim游戏

#include <stdio.h>int main(){    int m,n,a;    while(scanf("%d", &m), m)    {        n = 0;        while(m-- && scanf("%d", &a))            n ^= a;        puts(n ? "Rabbit Win!" : "Grass Win!");    }    return 0;}

 

hdu1849