cards=int(raw_input("Cards:"))maxNo=2**cards# This is actually [Max Number]+1mask=1# Mask for bitwise "and" to filter the last bitoutput=[]# Init outputforiinrange(0,cards):output.append([])foriinrange(1,maxNo):num=iforjinrange(0,cards):ifnum&mask==1:output[j].append(i)num>>=1printoutput
Comments (1)
kurki epst
In order to learn about frequency bands in nb-iot technology, I found this site, where this topic is explained in an accessible and high-quality way - nb-iot frequency bands . I advise you to visit this site as well, because you can also learn a lot of useful information on a lot of cool topics! Goodbye.
HTTPSSSH
You can clone a snippet to your computer for local editing.
Learn more.
In order to learn about frequency bands in nb-iot technology, I found this site, where this topic is explained in an accessible and high-quality way - nb-iot frequency bands . I advise you to visit this site as well, because you can also learn a lot of useful information on a lot of cool topics! Goodbye.