文件名称:monkey
介绍说明--下载内容均来自于网络,请自行研究使用
山上有m只猴子要选大王,选举办法如下:所有猴子从1到m进行编号并围坐一圈,从第一号开始按顺序1,2,...n继续报数,凡是报n号的猴子都退出到圈外,照此循环报数,直到圈内只剩下一只猴子时,这只猴子就是大王.输出大王的编号。-Has m mountains monkeys to choose the king, the election would be as follows: all the monkeys carried out from 1 to m number and sitting around, starting from the first sequence 1,2, ... n continue to report the number of those who reported n No. monkeys have to withdraw from the outside, to do the same cycle off until the circle only when a monkey, the monkey is king. magnate output number.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
monkey.c