TOPIC

Runtime error

Sebastián Céspedes Alfaro asked 1 year ago

A = input().split( ) B = input().split( ) i = 1 Jugadores = [] while i <= int(A[0]): Jugadores.append(i) i += 1 Pts = [] for elem in Jugadores: elem *= 0 Pts.append(elem) def sumaPts(Pts, B): if B == []: return Pts i = 0 R = [] while i < len(Pts): R.append(Pts[i]+int(B[i])) i += 1 return sumaPts(R, B[(len(Pts)):]) Q = (sumaPts(Pts, B)) def maxLista(Q): if (Q==[]): return 0 return mayor(Q[0],maxLista(Q[1:])) def mayor(a,b): if (a > b): return a return b def posdelmaximo(pos,May): if pos == 0: return pos if Q[pos-1] == May: return pos return posdelmaximo(pos-1, May) print(posdelmaximo(len(Q),maxLista(Q)))

This topic has not been answered yet. Be the first!

Remember not post solutions. Your post may be reviewed by our moderators.