Partition function by hallvabo

i=100
a=[1]+[0]*i
while i:j=k=101-i;exec'a[j]+=a[j-k];j+=1;'*i;i-=1;print"p(%u)="%k+`a[k]`

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

download

return to the top page