Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Sukces !!!!!!!!!!!! solution in Clear category for The Hamming Distance by Fokzterrier
def checkio(n, m):
liczba1= bin(n)
liczba2= bin(m)
liczba1=liczba1[2:]
liczba2=liczba2[2:]
a = list(str(liczba1))
b = list(str(liczba2))
if len(a) >= len(b):
c = 0
d = n
e = m
suma = 0
while c < len(a):
print(abs(d%2 - e%2),'modulo')
if abs(d%2 - e%2) == 1:
suma += 1
d = d//2
e = e//2
c += 1
return suma
else:
c = 0
d = n
e = m
suma = 0
while c
Nov. 13, 2016