Joshephus or MamakoDate Sequence EASY by pooq

File standardInput readLines map(split map(asNumber)reduce(m,n,a:=list
for(i,1,m,a push(i))
for(i,1,m,(n-1)repeat(a push(a removeFirst))
write(a removeFirst,if(m>i," ","
")))))

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page