题解 | #输入整型数组和排序标识,对其元素按照升序或降序进行排序#
输入整型数组和排序标识,对其元素按照升序或降序进行排序
http://www.nowcoder.com/practice/dd0c6b26c9e541f5b935047ff4156309
while 1:
try:
input()
lst = [int(i) for i in input().split()]
r = int(input())
if r == 0:
lst.sort()
else:
lst.sort(reverse=True)
lst = [str(i) for i in lst]
print(' '.join(lst))
except:
break
平安产险科技中心工作强度 22人发布