Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Multiplication Table by Tinus_Trotyl
def checkio(first, second):
x, y = bin(first)[2:], bin(second)[2:]
sum = 0
for operand in ("&", "|", "^"):
for i in x:
a = int(i)
c = 0
for j in y:
b = int(j)
c = 2 * c + eval("a" + operand + "b")
sum += c
return sum
May 28, 2017
Comments: