Welcome![Sign In][Sign Up]
Location:
Downloads SourceCode Other assembly language
Title: Josephus-problem Download
 Description: Joseph describes the problem: There n monkeys, clockwise circle selected King (numbered 1 to n), No. 1 the beginning of the number of packets, the number has to m, m number of monkeys to exit out of the loop, left under the monkey and then followed start number 1 newspaper. In this way, the circle until only a monkey, the monkey is the monkey, programming seek input n, after m, the number of output last Monkey King. Enter each line are two integers separated by a space, the first is n, the second is m (0 < m, n < = 300). The last line is: 00 Output For each line of input data (except for the last line), the output data is a line that the final number of the Monkey King
 Downloaders recently: [More information of uploader Yilia]
 To Search:
File list (Check if you may need any files):
 

绾︾憻澶

CodeBus www.codebus.net