Zigzag by nn

(n,c)="$System.in".split()
n=n as int
m=2*n-2
n.times{i->println((0..~-n*m+i).sum{m-i-it%m&&i-it%m?' ':c})}

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

download

return to the top page