文件名称:约瑟夫环
介绍说明--下载内容来自于网络,使用问题请自行百度
已知n个人(以编号1,2,3...n分别表示)围坐在一张圆桌周围。从编号为k(k<n)的人从1开始报数,数到m的那个人出列;他的下一个人从1开始报数,数到m的那个人又出列;依此规律重复下去,直到圆桌周围的人全部出列。试设计算法按出列次序依次输出编号。(Known n individuals (numbered 1, 2, 3... N) are sitting around a round table. From the number of K (k<n) of people from 1 to start off, the man out of the line to the m; his next person from 1 to start off, count to m that another person out; so law be repeated until all of the people out around the table. Try to design the algorithm according to the column order output number.)
(系统自动生成,下载前可以参看下载内容)
下载文件列表
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.