Triangle by primo

n=input()
def f(x):
 a=' '.join(`(i*i+i)/2-x`for i in range(x+1,21)if i*i+i<=n+x<<1)
 if a:f(x+1);print a
f(0)

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

download

return top