文件名称:The-Monkey-King
介绍说明--下载内容均来自于网络,请自行研究使用
猴子选大王
*问题描述:一堆猴子都有编号,编号是1,2,3 ...m ,这群猴子(m个)按照1-m的顺序围坐一圈,从第1开始数,每数到第N个,该猴子就要离开此圈,这样依次下来,直到圈中只剩下最后一只猴子,则该猴子为大王。
*输入数据:输入m,n m,n 为整数,n<m
*输出形式:中文提示按照m个猴子,数n 个数的方法,输出为大王的猴子是几号 ,建立一个函数来实现此功能 -* descr iption: a pile of monkeys have Numbers, Numbers is 1, 2, 3... M, this group of monkeys (m) according to the order of 1-m sitting a circle, from the first start to count, each count to the first N, this monkey leave this circle, this in turn down, until only one circle of a monkey, the monkey as king.
* input data: input m, n m, n for integer, n < m
* output form: Chinese hint according to m a monkey, several methods of n number, the output of the monkey is king for number, build a function to perform this function
*问题描述:一堆猴子都有编号,编号是1,2,3 ...m ,这群猴子(m个)按照1-m的顺序围坐一圈,从第1开始数,每数到第N个,该猴子就要离开此圈,这样依次下来,直到圈中只剩下最后一只猴子,则该猴子为大王。
*输入数据:输入m,n m,n 为整数,n<m
*输出形式:中文提示按照m个猴子,数n 个数的方法,输出为大王的猴子是几号 ,建立一个函数来实现此功能 -* descr iption: a pile of monkeys have Numbers, Numbers is 1, 2, 3... M, this group of monkeys (m) according to the order of 1-m sitting a circle, from the first start to count, each count to the first N, this monkey leave this circle, this in turn down, until only one circle of a monkey, the monkey as king.
* input data: input m, n m, n for integer, n < m
* output form: Chinese hint according to m a monkey, several methods of n number, the output of the monkey is king for number, build a function to perform this function
(系统自动生成,下载前可以参看下载内容)
下载文件列表
The Monkey King.txt