a= int(input()) N='' while a>0: N=str(a%2)+N a=a//2 N=float(N) if (N%2)==0: N = str(N) N= N="1"+N+"0" else: N = str(N) N="11"+N+"11" print (int(N,2))
str_input = input(': ') bin_str = '' for i in str_input: if int(i) % 2: bin_str = f'11{bin_str}11' else: bin_str = f'1{bin_str}0' print(bin_str, int(bin_str, 2))
str_input = input(': ') int_input = int(str_input) if int_input % 2: mask = 0b11 * 2 ** int_input.bit_length() res = mask | int_input << 2 | 0b11 else: mask = 2 ** int_input.bit_length() res = mask | int_input << 1