Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Multiplication Table by tihenko
def checkio(first, second):
answer=0
line1=line2=line3=''
for f in bin(first)[2:]:
for s in bin(second)[2:]:
line1+=str(int(f)&int(s)) #and
line2+=str(int(f)|int(s)) #or
line3+=str(int(f)^int(s)) #xor
answer+=int(line1, 2)+int(line2, 2)+int(line3, 2)
line1=line2=line3=''
return answer
Feb. 28, 2014
Comments: