from itertools import* b,w=map(int,raw_input().split()) for z in combinations(range(1,b+1),w):print" ".join(map(str,z))
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page