文件名称:yuesefuhuan
介绍说明--下载内容来自于网络,使用问题请自行百度
设有n(n>0)个人围成一个圈,编号为1至n,都持有相同的密码m。从第一个人从1开始报数,报到m时停止报数,此人出圈。下一个人重新从1开始报数,报到m时停止报数,此人出圈。以此类推,直到所有人全部出圈为止。任意给定n和m,判断输入是否合法,如果非法指明原因;如果合法输出相应的出圈编号顺序。(The n (n > 0) individuals are surrounded by a circle, numbered 1 to N, and all hold the same password m. From the first person from 1 to start off, back off m stop, the person out of the ring. The next person to start off from the 1 stop, back off m, the man out of the ring. And so on, until all people get out of the circle. Arbitrarily given n and m, determine whether the input is legitimate, if the reason is unlawfully specified; if the legitimate output of the corresponding out of the ring sequence.)
相关搜索: C++
(系统自动生成,下载前可以参看下载内容)
下载文件列表
文件名 | 大小 | 更新时间 |
---|---|---|
yuesefuhuan.cpp | 2165 | 2017-06-18 |
报告.pdf | 346447 | 2018-03-13 |
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.