Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def partits(llista):
- i = 1
- maxPunts = llista[0][1] * 2 + llista[0][2]
- maxI = 0
- while i < len(llista):
- punts = llista[i][1] * 2 + llista[i][2]
- if punts > maxPunts:
- maxPunts = punts
- maxI = i
- elif punts == maxPunts:
- difMax = llista[maxI][5] - llista[maxI][4]
- difActual = llista[i][5] - llista[i][4]
- if difActual < difMax:
- maxPunts = punts
- maxI = i
- i += 1
- return llista[maxI][0]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement