Josephus problem: Difference between revisions
Content deleted Content added
m →{{header|Phix}}: removed Quackery from unclassified |
|||
Line 2,511:
</pre>
=={{header|Mathematica}}/{{header|Wolfram Language}}==
<lang mathematica>survivor[n_, k_] := Nest[Most[RotateLeft[#, k]] &, Range[0, n - 1], n - 1]
survivor[41, 3]</lang>
{{out}}
<pre>{30}</pre>
=={{header|MATLAB}}==
|