Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Second solution in Clear category for Multiplication Table by edutilos
def checkio(first, second):
first, second = bin(first)[2:], bin(second)[2:]
r = 0
for i in first:
sum_xor, sum_and, sum_or = "", "", ""
for j in second:
sum_xor += str(int(i) ^ int(j))
sum_and += str(int(i) & int(j))
sum_or += str(int(i) | int(j))
r += sum([int(sum_xor, base=2), int(sum_and, base=2), int(sum_or, base=2)])
return r
April 10, 2016