Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
5-liner: easy solution in Clear category for Multiplication Table by przemyslaw.daniel
def checkio(a, b):
result, k = 0, 2**b.bit_length()-1
for i in map(int, bin(a)[2:]):
result += (k*i & b)+(k*i | b)+(k*i ^ b)
return result
Dec. 18, 2017