a, c = map(int, input().split()) aa = bin(a) #aを2進数にする(上2つは'0b') cc = bin(c) #cを2進数にする(上2つは'0b') print("a_2 = ",aa) print("c_2 = ",cc) #例)c = 101011, a = 1101 -> b = 100110 al = len(aa) cl = len(cc) b = "" b = b + '0b' d = cl - al if d == 0: for i in range(2, al): if aa[i] == cc[i]: if aa[i] == '1': # cc[i] == 1 b = b + '0' else: # cc[i] == 0 b = b + '0' else: if aa[i] == '1': # cc[i] == 0 b = b + '1' else: # cc[i] == 1 b = b + '1' elif d != 0: for i in range(2, d + 2): b = b + str(cc[i]) print(i) for j in range(2, al): if aa[j] == cc[j+d]: if aa[j] == '1': # cc[j] = 1 b = b + '0' else: # cc[j] = 0 b = b + '0' elif aa[j] != cc[j+d]: if aa[j] == '1': # cc[j] = 0 b = b + '1' else: # cc[j] = 1 b = b + '1' print(b) print(int(b, 2))