ハミング距離

PythonでThe Hamming Distance

コード def checkio(n, m): num3 = format(n ^ m,"b").count("1") print num3 if __name__ == '__main__': checkio(117, 17) checkio(1, 2) checkio(16, 15) 参考にしたサイト ハミング距離 - Wikipedia ビット演算子 - 数値 - Python入門 pythonでn進数への…