登录
首页 » 算法 » a description of the problem is : No. 1, 2, ..., n n clockwise direction by indi...

a description of the problem is : No. 1, 2, ..., n n clockwise direction by indi...

于 2022-02-03 发布 文件大小:1.35 kB
0 37
下载积分: 2 下载次数: 1

代码说明:

约瑟夫问题的一种描述是:编号为1,2,…,n的n个人按顺时针方向围坐一圈,没人持有一个密码。一开始人选一个正整数作为报数上限值m,从第一个人开始按顺时针自1开始报数,报到m是停止报数。报m的人出列,将他的密码作为新的m值,从他在顺时针方向上的下一个人开始重新从1报数,如此下去,直至所有人全部出列为止。-a description of the problem is : No. 1, 2, ..., n n clockwise direction by individuals sitting around a circle, no one holding a password. One person started as a positive integer limits on the number of reported m, from the first individuals to embark on the clockwise from a few reportedly started, the report m is reportedly stopped a few. M reported out of the list of his password as a new value m, from a clockwise direction in the next re-started from a newspaper a few, like that, until the total of all listed so far.

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 696522资源总数
  • 104027会员总数
  • 45今日下载