Stars and Bars by llhuii

def f(i,j,r):
 if i and f(i-1,j,r+"*")>f(i-1,j-1,r+"|")or i==j==0:print r
a,b=map(int,raw_input().split());b-=1;f(a+b,b,'')

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

download

return to the top page