题解 | 不重复数字

不重复数字

https://www.nowcoder.com/practice/38532b5539164242b4252352be8749ab

n = int(input())
for i in range(n):
    N = int(input())
    se = set()
    num = []
    li = list(map(int,input().split()))
    for i in li:
        if i not in se:
            se.add(i)
            num.append(i)
    for i in num:
        print(i,end=" ")
    print()

全部评论

相关推荐

评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务