Description: The Joseph question is a classical problem. Known n individuals (may wish to be numbered 1, 2, 3, respectively,... N, representative) sitting around a round table, K from a number of people, from the beginning of 1 clockwise off 1, 2, 3,..., the clockwise to the m, and the output of the column. Then start from the next person out of the column to start clockwise off from 1, the count of M, and the output of the column,... This repeated until all of the people out around the table.
Input: n, K, M
Output: according to the order of the columns in the output column number, number separated by a space, each of the 10 numbers for a row.
The illegal input corresponds to the following output
A)
Input:: n, K, m, any less than 1
Output: n, m, K, must, bigger, than, 0.
B)
Input: k>n
Output: K, should, not, bigger, than, n.
example
input
9,3,2
output
46813729, 5
To Search:
File list (Check if you may need any files):
ysf.exe
ysf.cpp