题解 2059: [STL训练]sort练习

来看看其他人写的题解吧!要先自己动手做才会有提高哦! 
返回题目 | 我来写题解

筛选

sort练习---python

解题思路:注意事项:参考代码:n,m=map(int,input().split())l=list(map(int,input().split()))#要把列表中的数设为Int型,才能适应sort()l.sort()l.reverse()foriinrange(m):print(l[i],

2059——————sort练习

n,m=map(int,input().split())s=sorted(list(map(int,input().split())))[::-1]foriinrange(m):print(s[i],end='')n,m=map(int,input().split())s=list(map(int,

2059: [STL训练]sort练习

摘要:解题思路:注意事项:参考代码:n,m = map(int,input().split()) lis = list(map(int,input().split())) lis.sort(revers……