Distributing the balls by lupus

while 1:\x0d
    s=(raw_input());\x0d
    if(len(s)==0): break;\x0d
    m,n=map(int,s.split());b=2**n;\x0d
    print sum((b+1)**n/b**k%b*(-1)**k*(n-k)**m for k in range(n))

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

download

return to the top page