文件名称:gansiduiwenti
-
所属分类:
- 标签属性:
- 上传时间:2013-03-19
-
文件大小:2.16mb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
“敢死队问题”
有M个敢死队员要炸掉敌人的一碉堡,谁都不想去,排长决定用轮回数数的办法来决定哪个战士去执行任务。如果前一个战士没完成任务,则要再派一个战士上去。现给每个战士编一个号,大家围坐成一圈,随便从某一个战士开始计数,当数到5时,对应的战士就去执行任务,且此战士不再参加下一轮计数。如果此战士没完成任务,再从下一个战士开始数数,被数到第5时,此战士接着去执行任务。以此类推,直到任务完成为止。
排长是不愿意去的,假设排长为1号,请你设计一程序,求出从第几号战士开始计数才能让排长最后一个留下来而不去执行任务。-" Death squads" of M squads to blow up enemy bunkers, no one wanted to go, platoon leader decided to a transmigration count approach to decide which fighters to perform the task. If you did not complete the task before a soldier, will have to send another one of the soldiers up. Now compiled a number to each soldier, we were sitting in a circle, casually counted from the beginning of a warrior, count to 5, corresponding to the soldiers went to perform the task, and the soldiers no longer participate in the next round of counting. If soldiers did not complete the task, from a soldier began to count, count to 5, this warrior went on to perform the task. And so on, until the task is completed so far. The platoon leader is not willing to go, assuming that the platoon leader for the 1st, you design a program determined to start counting the number of soldiers to let platoon last stay and not to perform the task.
有M个敢死队员要炸掉敌人的一碉堡,谁都不想去,排长决定用轮回数数的办法来决定哪个战士去执行任务。如果前一个战士没完成任务,则要再派一个战士上去。现给每个战士编一个号,大家围坐成一圈,随便从某一个战士开始计数,当数到5时,对应的战士就去执行任务,且此战士不再参加下一轮计数。如果此战士没完成任务,再从下一个战士开始数数,被数到第5时,此战士接着去执行任务。以此类推,直到任务完成为止。
排长是不愿意去的,假设排长为1号,请你设计一程序,求出从第几号战士开始计数才能让排长最后一个留下来而不去执行任务。-" Death squads" of M squads to blow up enemy bunkers, no one wanted to go, platoon leader decided to a transmigration count approach to decide which fighters to perform the task. If you did not complete the task before a soldier, will have to send another one of the soldiers up. Now compiled a number to each soldier, we were sitting in a circle, casually counted from the beginning of a warrior, count to 5, corresponding to the soldiers went to perform the task, and the soldiers no longer participate in the next round of counting. If soldiers did not complete the task, from a soldier began to count, count to 5, this warrior went on to perform the task. And so on, until the task is completed so far. The platoon leader is not willing to go, assuming that the platoon leader for the 1st, you design a program determined to start counting the number of soldiers to let platoon last stay and not to perform the task.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
敢死队问题/
敢死队问题/Debug/
敢死队问题/Debug/StdAfx.obj
敢死队问题/Debug/vc60.idb
敢死队问题/Debug/vc60.pdb
敢死队问题/Debug/敢死队问题.exe
敢死队问题/Debug/敢死队问题.ilk
敢死队问题/Debug/敢死队问题.obj
敢死队问题/Debug/敢死队问题.pch
敢死队问题/Debug/敢死队问题.pdb
敢死队问题/Debug/敢死队问题.res
敢死队问题/Debug/敢死队问题Dlg.obj
敢死队问题/ReadMe.txt
敢死队问题/Resource.h
敢死队问题/StdAfx.cpp
敢死队问题/StdAfx.h
敢死队问题/res/
敢死队问题/res/敢死队问题.ico
敢死队问题/res/敢死队问题.rc2
敢死队问题/敢死队问题.aps
敢死队问题/敢死队问题.clw
敢死队问题/敢死队问题.cpp
敢死队问题/敢死队问题.dsp
敢死队问题/敢死队问题.dsw
敢死队问题/敢死队问题.h
敢死队问题/敢死队问题.ncb
敢死队问题/敢死队问题.opt
敢死队问题/敢死队问题.plg
敢死队问题/敢死队问题.rc
敢死队问题/敢死队问题Dlg.cpp
敢死队问题/敢死队问题Dlg.h
敢死队问题/Debug/
敢死队问题/Debug/StdAfx.obj
敢死队问题/Debug/vc60.idb
敢死队问题/Debug/vc60.pdb
敢死队问题/Debug/敢死队问题.exe
敢死队问题/Debug/敢死队问题.ilk
敢死队问题/Debug/敢死队问题.obj
敢死队问题/Debug/敢死队问题.pch
敢死队问题/Debug/敢死队问题.pdb
敢死队问题/Debug/敢死队问题.res
敢死队问题/Debug/敢死队问题Dlg.obj
敢死队问题/ReadMe.txt
敢死队问题/Resource.h
敢死队问题/StdAfx.cpp
敢死队问题/StdAfx.h
敢死队问题/res/
敢死队问题/res/敢死队问题.ico
敢死队问题/res/敢死队问题.rc2
敢死队问题/敢死队问题.aps
敢死队问题/敢死队问题.clw
敢死队问题/敢死队问题.cpp
敢死队问题/敢死队问题.dsp
敢死队问题/敢死队问题.dsw
敢死队问题/敢死队问题.h
敢死队问题/敢死队问题.ncb
敢死队问题/敢死队问题.opt
敢死队问题/敢死队问题.plg
敢死队问题/敢死队问题.rc
敢死队问题/敢死队问题Dlg.cpp
敢死队问题/敢死队问题Dlg.h
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.