Triangle by yvl

a=[]
1.upto(b=gets.to_i){|i|a[b+=1]?a[b]<<i:a=[[i+b=0]]+a}
puts a.map{|i|i*" "}

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

download

return to the top page