python蓝桥等考十八级真题(4)!
2023-02-14 21:58
views:
1702
source:
4664946
a=input()
a=int(a)
b=input()
b=int(b)
c=input()
c=c.split()
c=[int(i)for i in c]
c.sort()
c=c[::-1]
cnt=0
for i in range(b):
cnt+=c[i]
print(cnt)
#1234567890qwertyuiopasdfghjkl;'zxcvbnm,./
#(凑字数)
#对不起,上一次把题目打错了,请谅解
Disclaimer: The above articles are added by users themselves and are only for typing and communication purposes. They do not represent the views of this website, and this website does not assume any legal responsibility. This statement is hereby made! If there is any infringement of your rights, please contact us promptly to delete it.