【巴什博弈】知识点讲解+例题x1




例题:


#include<iostream>
using namespace std;
int main(){
    int m,n;
    cin>>m>>n;
    if(m<=n){
        for(int i=m;i<n;i++){
            cout<<i<<" ";
        }
        cout<<n<<endl;
    }else{
        if(m%(n+1)==0)
            cout<<"none"<<endl;
        else{
            cout<<m%(n+1)<<endl;
        }
    }
    return 0;
}

猜你喜欢

转载自blog.csdn.net/m0_38033475/article/details/80259793