Triangle by gattschardo

k,i,b;main(n){scanf("%d",&n);for(;b<n;b+=++k);for(;k;k--)for(b=-k+1,i=0;b<=n;b+=i++)k<i?b>n?0:printf("%d%c",b,b+i>n?10:32):0;}

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

download

return to the top page