2019-03-04 19:31:01 Python

006

Copy Copied! Full
numdeta=[int(a) for a in input().split()] paramater=numdeta[0] numofusers=numdeta[1] numoftoprank=numdeta[2] scoredeta=[float(a) for a in input().split()] item1=scoredeta[0] item2=scoredeta[1] item3=scoredeta[2] item4=scoredeta[3] scorelist=[] for x in range(numofusers): pointdeta=[int(a) for a in input().split()] item1_have=pointdeta[0] item2_have=pointdeta[1] item3_have=pointdeta[2] item4_have=pointdeta[3] Score=round(item1*item1_have+item2*item2_have+item3*item3_have+item4*item4_have) scorelist.append(Score) scorelist=sorted(scorelist,reverse=True) scorelist=scorelist[0:numoftoprank] [print(i) for i in scorelist]
006
RECOMMEND