Joshephus or MamakoDate Sequence EASY by nn

i,d;main(c,m,n){for(;d=i=i?:scanf("%d%d",&m,&n)/2*m;printf(--i?"%d ":"%d\n",1-c))for(c=1;c=(c-n)%d,d++<m;);}

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

download

return to the top page