CodeBus
www.codebus.net
Search
Sign in
Sign up
Hot Search :
Source
embeded
web
remote control
p2p
game
More...
Location :
Home
Search - josephus
Main Category
SourceCode
Documents
Books
WEB Code
Develop Tools
Other resource
Search - josephus - List
[
Software Engineering
]
Josephus-Problem
DL : 0
约瑟夫问题(Josephus Problem)据说著名犹太历史学家 Josephus有过以下的故事:在罗马人占领乔塔帕特后,39 个犹太人与Josephus及他的朋友躲到一个洞中,39个犹太人决定宁愿死也不要被敌人到,于是决定了一个自杀方式,41个人排成一个圆圈,由第1个人开始报数,每报数到第3人该人就必须自杀,然后再由下一个重新报数,直到所有人都自杀身亡为止。 然而Josephus 和他的朋友并不想遵从,Josephus要他的朋友先假装遵从,他将朋友与自己安排在第16个与第31个位置,于是逃过了这场死亡游戏。   原题:   用户输入M,N值,N个人围成一个环,从0号人开始数,数到M,那个人就退出游戏,直到最后一个人 求最后一个剩下的人是几号?-The problem of Joseph (Josephus Problem) said that the famous Jewish historian Josephus had the following story: in the Romans occupied Qiaotapate, 39 Jews and Josephus and his friends hid in a hole, 39 Jews, the decision would rather die Do not be an enemy to, and decided a means of suicide, 41 individuals arranged in a circle by an individual number off each number off to the third person that the person must commit suicide, and then re-reported the number of the next until all have committed suicide, killed so far. However, Josephus and his friends do not want to comply with Josephus, to be the first to pretend to comply with his friends, he will be friends with their own arrangements in the 16 and 31 position, then escaped the death game. The original question: the user to enter M, N value, N, surrounded by a ring from No. 0 people began to count, count to M, that person will quit the game until the last person to ask the last one the rest of the people is ?
Date
: 2026-01-09
Size
: 195kb
User
:
liu
[
Software Engineering
]
JesephRing
DL : 0
约瑟夫环上机报告,设计一个程序模拟过程,并给出出列人的编号序列.-Josephus reports on the machine
Date
: 2026-01-09
Size
: 22kb
User
:
凯撒
[
Software Engineering
]
yue-se-fu-huan
DL : 0
用c语言详细描述了约瑟夫环,感兴趣的可以看下,很不错。-C language with a detailed description of Josephus, interested can look very good.
Date
: 2026-01-09
Size
: 12kb
User
:
幻儿
CodeBus
is one of the largest source code repositories on the Internet!
Contact us :
1999-2046
CodeBus
All Rights Reserved.