Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Second solution in Clear category for Multiplication Table by gyahun_dash
from operator import and_, or_, xor
def checkio(first, second, ops=(and_, or_, xor)):
bits = map(int, '{:b}'.format(first))
length = second.bit_length()
return sum(op(second, 2 ** (b * length) - 1) for b in bits for op in ops)
May 5, 2015
Comments: