hdu 5978 To begin or not to begin 博弈水題

很簡單的博弈

代碼也很簡單

#include <iostream>
#include <stdio.h>
#include<string.h>
#include<math.h>
#include <algorithm>
#define pi 3.1415926
using namespace std;
int main()
{
    int  m,n;
    while(cin>>m)
    {
        if(m%2==1)
             puts("0");
             else
                puts("1");
    }
    return 0;
}



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章