目录
题目描述
在一个长度为 n 的数组 nums 里的数组中,数字两两相同,有两个不同,找出数组中不同的这两个数。
参考示例
示例 1
输入:2 3 1 5 2 5 3 7
输出:1 7
参考代码
def calc():
nums_input = list(map(int, input().split()))
ret = []
for c in nums_input:
if nums_input.count(c) == 1:
ret.append(str(c))
print(" ".join(ret))
while True:
try:
calc()
except:
break
机试介绍
三道中等难度题目&#x