System.in.eachLine{{m,n->a=0..m 1.upto(m*n){i->i%n?a+=a[i]:print(a[i]+' \n'[i<m*n?0:1])}}it.split()*.toLong()}
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page