P1996求助

P1996 约瑟夫问题

希望更丰富的展现?[使用Mark♂down](https://www.luogu.org/wiki/show?name=%E5%B8%AE%E5%8A%A9%EF%BC%9Amarkdown)
by aminoas @ 2019-03-26 19:57:17


https://www.luogu.org/space/show?uid=143834
by 毛梁智洲666 @ 2019-03-26 20:02:59


希望更丰富的展现?使用Markdown
by 空の軌跡 @ 2019-03-26 20:03:45


@[毛梁智洲666](/space/show?uid=152873) WHAT?
by aminoas @ 2019-03-26 20:13:04


求助大佬!!!
by 毛梁智洲666 @ 2019-03-26 20:14:18


@[2018J1605](/space/show?uid=143834) 你能告诉我吗
by 毛梁智洲666 @ 2019-03-26 20:15:22


@[毛梁智洲666](/space/show?uid=152873) 你没排版好我怎么帮你...
by aminoas @ 2019-03-26 20:16:16


#### include<iostream> ### using namespace std; ### bool a[101]; ### int main() { ###### int n,m; ###### cin>>n>>m; ###### cout<<endl; ###### for(int i=1; i<=n; i++)a[i]=false; ###### int 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; ###### }
by 毛梁智洲666 @ 2019-03-26 20:20:40


@[2018J1605](/space/show?uid=143834)
by 毛梁智洲666 @ 2019-03-26 20:20:56


@[毛梁智洲666](/space/show?uid=152873) 请在代码前后加上"```" 效果: ``` 代码 ```
by aminoas @ 2019-03-26 20:22:21


| 下一页