题解 | #输入整型数组和排序标识
输入整型数组和排序标识,对其元素按照升序或降序进行排序
https://www.nowcoder.com/practice/dd0c6b26c9e541f5b935047ff4156309
n=int(input())
ls=list(map(int,input().strip().split()))
ls.sort(reverse=True if input()=="1" else False)
print(" ".join(map(str,ls)))
输入整型数组和排序标识,对其元素按照升序或降序进行排序
https://www.nowcoder.com/practice/dd0c6b26c9e541f5b935047ff4156309
n=int(input())
ls=list(map(int,input().strip().split()))
ls.sort(reverse=True if input()=="1" else False)
print(" ".join(map(str,ls)))
相关推荐
哈哈哈,你是老六:就这不去的人大把人干呢,现在不缺人干活,你不干大把干呢,还有那个说农民工赚钱的,那个800+我估计肯定也就那一段时间,哪有这么赚钱,还是一句话,要想存下钱必须花销极低,能省的就不花钱,工资要高点