约瑟夫问题的C++实现

我这个并不是通用型,本身想改的话也很简单。html 题目:有41我的,围成一圈,编号从1到41.从1开始数,每到第三我的,出局。让依次输出出局的人的编号。ios 好比一开始就是:3  6  9  12 。。。。spa 代码以下:code #include <iostream> using namespace std; int main() { int a[41],n,t; n = 0;//已经
相关文章
相关标签/搜索