全WA求调
查看原帖
全WA求调
1768455
XJY0201楼主2025/7/28 10:08
#include<bits/stdc++.h>
using namespace std;
int n,m,s,f,t;
bool a[101];
int main()
{
    cin>>n>>m;
    cout<<endl;
    for(t=1;t<=n;++t) a[t]=false;
    f=0;t=0;s=0;
    do{
        ++t;if(t==n+1) t=1;
        if(a[t]==false)++s;
        if(s==m)
        {
            s=0;
            cout<<t<<" ";
            a[t]=true;
            f++;
        }
     }while(f!=n);
        return 0;
}

哪位大神能调一下

2025/7/28 10:08
加载中...