【中山市选2009】【BZOJ2463】谁能赢呢?

problem

solution

//如果n为奇数,走满所有格须移动偶数次,n为偶数的话奇数次,然后少到一格少移动两次,奇偶性不改变,所以即可判断胜负。

codes

#include<iostream>
using namespace std;
int main(){
    int n;
    while(cin>>n &&n){
        if(n&1)cout<<"Bob"<<'\n';
        else cout<<"Alice"<<'\n';
    }
    return 0;
}
posted @ 2018-05-27 21:30  gwj1139177410  阅读(74)  评论(0编辑  收藏  举报
选择