题解 | #输入整型数组和排序标识,对其元素升or降序排列#
输入整型数组和排序标识,对其元素按照升序或降序进行排序
https://www.nowcoder.com/practice/dd0c6b26c9e541f5b935047ff4156309
while True: try: a = int(input()) b = list(map(int, input().split())) c = input() if c == "0": print(*sorted(b)) # *用于解开list elif c == "1": print(*sorted(b, reverse=True)) except: break