Joshephus or MamakoDate Sequence EASY by uru

main(i,n,k,j,l){for(;~scanf("%d%d",&n,&k);)for(i=n;i>0;printf("%d%c",j+1,--i?32:10))for(l=i,j=-1;l<=n;j=(k+j)%l++);}

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

download

return to the top page