how does this work?
To paraphrase Arthur C Clarke: "Any sufficiently advanced Cody solution from Alfonso is indistinguishable from magic."
sdrawkcaB
Generalized Josephus problem
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
assert(isequal(decimate(10,3),4))
|
2 | Pass |
%%
assert(isequal(decimate(1024,3),676))
|
3 | Pass |
%%
assert(isequal(decimate(2012,50),543))
|
4 | Pass |
%%
assert(isequal(decimate(30,5),3))
|
5 | Pass |
%%
assert(isequal(decimate(10,10),8))
|
6 | Pass |
%%
assert(isequal(decimate(2048,2),1))
|
Back to basics 11 - Max Integer
611 Solvers
Getting the absolute index from a matrix
178 Solvers
Detect a number and replace with two NaN's
157 Solvers
Fahrenheit to Celsius converter
262 Solvers
179 Solvers