文件名称:ftg
- 所属分类:
- Windows编程
- 资源属性:
- [Text]
- 上传时间:
- 2012-11-26
- 文件大小:
- 1kb
- 下载次数:
- 0次
- 提 供 者:
- wang d******
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
所有学生以圆形围着老师,每个学生开始时均有偶数块糖果,老师每吹一次哨子,
每位学生拿出手中一半糖果给右侧的同学,对任何一个学生,吹哨后,当手中的糖
果数为奇数块时,由老师补一块给他(她),这样下去,当每个学生手中的糖果数
相同时,游戏结束。
输入要求:游戏测试不止一个,对于每个游戏测试,输入学生人数N,开始时每个
学生手中的糖果数分别为多少(EVEN),输入学生人数为"0"时,测试结束
。
输出要求:对每个游戏测试,输出老师吹了几次哨后,学生手中的糖果数相同,并
且在同一行输出学生手中相同的糖果数是多少。-【To achieve sub-candy 】
【Rules】 for all students to circle around the teacher, each student has even block the start of candy, blowing a whistle every teacher,
The hands of every student to come up with the right half of the candy to the students, of any student, after the whistle, when the hands of the sugar
Odd number of pieces of fruit, the one completed by the teacher to give him (her), like this, when the hands of candy each student a number of
The same, the end game.
Input requirements: games testing more than one test for each game, enter the number of students N, the beginning of each
The hands of a few students were the number of candies (EVEN), enter the number of students for the "0" when the end of the test
.
Output requirements: for each game test, the teacher output after blowing the whistle on several occasions, the number of students in the hands of the same candy, and
Output on the same line and the hands of the same students are the number
每位学生拿出手中一半糖果给右侧的同学,对任何一个学生,吹哨后,当手中的糖
果数为奇数块时,由老师补一块给他(她),这样下去,当每个学生手中的糖果数
相同时,游戏结束。
输入要求:游戏测试不止一个,对于每个游戏测试,输入学生人数N,开始时每个
学生手中的糖果数分别为多少(EVEN),输入学生人数为"0"时,测试结束
。
输出要求:对每个游戏测试,输出老师吹了几次哨后,学生手中的糖果数相同,并
且在同一行输出学生手中相同的糖果数是多少。-【To achieve sub-candy 】
【Rules】 for all students to circle around the teacher, each student has even block the start of candy, blowing a whistle every teacher,
The hands of every student to come up with the right half of the candy to the students, of any student, after the whistle, when the hands of the sugar
Odd number of pieces of fruit, the one completed by the teacher to give him (her), like this, when the hands of candy each student a number of
The same, the end game.
Input requirements: games testing more than one test for each game, enter the number of students N, the beginning of each
The hands of a few students were the number of candies (EVEN), enter the number of students for the "0" when the end of the test
.
Output requirements: for each game test, the teacher output after blowing the whistle on several occasions, the number of students in the hands of the same candy, and
Output on the same line and the hands of the same students are the number
(系统自动生成,下载前可以参看下载内容)
下载文件列表
ftg.txt