文件名称:yuesifu
-
所属分类:
- 标签属性:
- 上传时间:2013-06-26
-
文件大小:768byte
-
已下载:1次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
有N个旅客同乘一条船,因为严重超载,加上风高浪大,危险万分;因此船长告诉乘客,只有将全船一半的旅客投入海中,其余人才能幸免于难,无奈,大家只得同意这种办法,并议定N个人围成一圈,由第一个人数起,依次报数,数到第K人,便把他投入大海中,然后再从他的下一个人数起,数到第K人,再把他投入大海中,如此循环地进行,直到剩下N/2个乘客为止。问哪些位置是将被投入大海的位置?-There are N ride a boat with passengers because of severe overloading, coupled with high winds and big waves, extremely dangerous therefore captain told passengers, only half of the whole ship passengers into the sea, the other person can survive, but unfortunately, we had to agree with this approach, and agreed N individuals circle, starting from the first individual number, followed by the number reported, the number to the first K who put him into the sea, and then from his next number, the number of people to K , and then he put the sea, so the cycle manner, until the rest of N/2 passengers so far. Q. What position is the position to be put in the sea?
(系统自动生成,下载前可以参看下载内容)
下载文件列表
yuesifu.txt
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.