题解 | 排序
排序
https://www.nowcoder.com/practice/dd0c6b26c9e541f5b935047ff4156309
n = int(input())
l = [int(i) for i in input().split()]
if input() == "0":
l.sort()
else:
l.sort(reverse=True)
print(" ".join(map(str,l)))
排序
https://www.nowcoder.com/practice/dd0c6b26c9e541f5b935047ff4156309
n = int(input())
l = [int(i) for i in input().split()]
if input() == "0":
l.sort()
else:
l.sort(reverse=True)
print(" ".join(map(str,l)))
相关推荐