Josephus problem: Difference between revisions

Updated to work with Nim 1.4: added missing parameter type and replaced ".. <" by "..<".
(Updated to work with Nim 1.4: added missing parameter type and replaced ".. <" by "..<".)
Line 2,630:
{{trans|Python}}
 
<lang nim>import sequtils, strutils, futuresugar
 
proc j(n, k: int): string =
var
p = toSeq(0 .. < n)
i = 0
s = newSeq[int]()
Anonymous user