日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 >

1.10 编程基础之简单排序 04 奖学金 7分 python

發(fā)布時間:2025/3/15 34 豆豆
生活随笔 收集整理的這篇文章主要介紹了 1.10 编程基础之简单排序 04 奖学金 7分 python 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

http://noi.openjudge.cn/ch0110/04/

""" 1.10 編程基礎之簡單排序 04 獎學金 7分 http://noi.openjudge.cn/ch0110/04/Python格式化輸出 https://blog.csdn.net/weixin_33857230/article/details/85630192python輸出姓名和最高成績_【Python】1004分排名(20分),Python1004,成績排名 https://blog.csdn.net/weixin_39649614/article/details/111440842 """n=int(input())student=[]for i in range(n) :score01,score02,score03=input().split()#并行輸入score=int(score01)+int(score02)+int(score03)student.extend([i+1,int(score)])#將一次輸入的數(shù)據(jù)添加到列表里#print(student)for i in range(1,len(student),2) :#print(i)#print(student[i])for j in range(i+2,len(student),2):#print(i)#print(j)if student[i] < student[j]:student[i], student[j] = student[j], student[i]student[i-1], student[j-1] = student[j-1], student[i-1]if student[i] == student[j]:if student[i-1] > student[j-1]:student[i], student[j] = student[j], student[i]student[i-1], student[j-1] = student[j-1], student[i-1]for i in range(1,11,2) :print(student[i-1],end=' ')print("%d"%student[i])#print(student)

總結

以上是生活随笔為你收集整理的1.10 编程基础之简单排序 04 奖学金 7分 python的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內容還不錯,歡迎將生活随笔推薦給好友。