Joshephus or MamakoDate Sequence EASY by not

s[];main(i,j,k,m){for(;~scanf("%d%d",&m,s);bzero(s,999))for(i=k=m;i--;printf("%d%c",s[k]=k,i?32:10))for(j=*s;j-=!s[k=k%m+1];);}

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

download

return to the top page