摘要:
nums = input("请输入多个数,以空格分隔:") num_list_bin = bytes(bytearray.fromhex(nums)) print(num_list_bin) sum = 0 for num in num_list_bin: sum += num #sum &= 0x 阅读全文
摘要:
nums = input("请输入多个数,以空格分隔:") num_list_bin = bytes(bytearray.fromhex(nums)) sum = 0 for num in num_list_bin: sum ^= num print("输入的数的和为:", hex(sum)) 阅读全文
摘要:
nums = input("请输入多个数,以空格分隔:") num_list_bin = bytes(bytearray.fromhex(nums)) for num in num_list_bin: print(hex(num),",", end=" ") 阅读全文