题解 | 不重复数字
不重复数字
https://www.nowcoder.com/practice/38532b5539164242b4252352be8749ab
# cs = int(input())
# for i in range(cs):
# n = input()
# num =list(map(int,input().split()))
# b = set(num)
# ans = list(b)
# print(" ".join(str(x) for x in b))
cs = int(input())
for _ in range(cs):
n = input()
num =list(map(int,input().split()))
print(" ".join(str(x) for x in list(dict.fromkeys(num))))
dict.fromkeys() 有序去重,set无序去重

字节跳动工作强度 1110人发布