+ 4

Help, please!

Information about the points of the first athlete, the second athlete, etc. means, like the one who takes the first leading place and so on down in the amount of points? If so, how do I populate the array so that the scores add up to first place, second place, etc.? Информация о баллах первого спортсмена, второго спортсмена и т.д значит, типо тот кто занимает первое лидирующее место и так вниз по сумме баллов? Если так, то как мне заполнить массив, так чтобы баллы в сумме занимали первое место, второе и т.д.? https://code.sololearn.com/cCVRCcrG6DKt/?ref=app

3rd Apr 2021, 6:23 PM
Iman🌸
Iman🌸 - avatar
2 Antworten
+ 1
First you need the sum of all athletes and then you need to sort them without loosing the index, so you now which athlete is the highest place. I wrote some code to calculate the sum and deleted b because it is just d + 1. https://code.sololearn.com/cti12Oar25V8/?ref=app
4th Apr 2021, 7:56 AM
Nico Ruder
Nico Ruder - avatar
0
Thank you)))
4th Apr 2021, 8:24 AM
Iman🌸
Iman🌸 - avatar