combination by mitchs

from itertools import*
a,b=map(int,raw_input().split())
for t in combinations(range(1,a+1),b):print' '.join(map(str,t))

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

download

return to the top page