You are viewing a single comment's thread. Return to all comments →
Here is my Python solution!
def andProduct(a, b): a = bin(a)[2:] b = bin(b)[2:] if len(a) != len(b): return 0 for i in range(len(a)): if a[i] != b[i]: return int(a[:i] + (len(a) - i) * "0", 2) return int(a, 2)
Seems like cookies are disabled on this browser, please enable them to open this website
AND Product
You are viewing a single comment's thread. Return to all comments →
Here is my Python solution!