Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Uncategorized category for Multiplication Table by TovarischZhukov
def checkio(f, s):
r=[]
for i, v1 in enumerate(bin(f)[2:]):
r1=[];r2=[];r3=[]
for j, v2 in enumerate(bin(s)[2:]):
r1.append("1" if int(v1) and int(v2)else "0")
r2.append("1" if int(v1) or int(v2)else "0")
r3.append("1" if v1!=v2 else "0")
r.append(int("".join(r1),2))
r.append(int("".join(r2),2))
r.append(int("".join(r3),2))
return sum(r)
Jan. 6, 2016