💡문제접근

중복을 빼주기 위해 set()을 이용해 변환하고 문제를 풀었다.

💡코드(메모리 : 41828KB, 시간 : 64ms)

import sys

N = int(input())
lst = list(map(int, sys.stdin.readline().strip().split()))

lst = list(set(lst))
lst.sort()

for i in lst:
    print(i, end=" ")

💡소요시간 : 1m

0개의 댓글

Powered by GraphCDN, the GraphQL CDN