var n,k,i,j:comp;begin repeat read(n,k);for i:=-n to-1do begin j:=-1;for n:=-i to n do j:=(j+k)mod n;write(j+1,(" ")[2+1div i])end until 1=0end.
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page