I seem to get 1773 for test case 6.
I also get 1773 for test case 6
I'll look into it a bit later on. In the meantime, that test case is deleted, so you can see if your solutions work for the rest of the test cases.
An interesting test case would have kill_every=1.
Am I the only one who finds the problem description really lacking? WTF does it mean "Because Prisoner 10 was counted during the first iteration,..." IMHO this is just blah and not a well-defined problem definition...
really wonderful thought!!! One of the best solution!
how does this work?
To paraphrase Arthur C Clarke: "Any sufficiently advanced Cody solution from Alfonso is indistinguishable from magic."
Generalized Josephus problem
great solution! (effectively working backwards to get the initial state)
Back to basics 19 - character types
Choose the best fitting dominoes
Calculate the Number of Sign Changes in a Row Vector (No Element Is Zero)
Divide by 4
Accessing values in a cell
Singularity v5 (with apologies to the true hack masters)
How brilliant are you?
Golomb's self-describing sequence (based on Euler 341)
I'm going to enjoy watching you calculate, Mr Anderson
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office