hdu2149巴什博弈

水题。(http://acm.hdu.edu.cn/showproblem.php?pid=2149)

#include <iostream>
#include <cstdio>
using namespace std;

int main()
{int m,n;
 while(cin>>m>>n)
 {
     if(n>=m)
     {
         for(int i=m;i<n;i++)
         cout<<i<<" ";
         cout<<n<<endl;//分开写,否则PE
         continue;
     }
     if(m%(n+1))
     {
         cout<<m%(n+1)<<endl;
         continue;
     }
     else
     cout<<"none"<<endl;
 }
    //cout << "Hello world!" << endl;
    return 0;
}

你可能感兴趣的:(hdu2149巴什博弈)