时间复杂度为:\(O(3^n)\)
s = 0b1000110 x = s while x != 0: print(bin(x)[2:]) x = (x - 1) & s ''' 1000110 1000100 1000010 1000000 110 100 10 '''