Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for The Hamming Distance by Pavellver
def checkio(n, m):
a, b = bin(max(n, m))[2:], bin(min(n, m))[2:]
b, h = b.rjust(len(a), '0'), 0
for i, j in zip(a, b):
if i != j:
h += 1
return h
April 17, 2023
Comments: