그냥 정렬 문제였다.
N = int(input()) lst = list(map(int, input().split())) lst.sort() for i in lst: print(i, end = " ")