points[i] is the total of the i-th skater. All totals are distinct.
Places go by score in descending order: the highest total takes first place, the next one second, and so on. Instead of a place number, the top three receive medals:
- 1st place: "Gold Medal";
- 2nd place: "Silver Medal";
- 3rd place: "Bronze Medal";
- 4th place onward: the place number as a string, such as "4".
Return an array of the same length whose i-th element is the medal or place of the i-th skater.points=[40, 95, 12, 70] → ['Bronze Medal', 'Gold Medal', '4', 'Silver Medal']
The second skater has the most (95) and gets gold, 70 gets silver, 40 gets bronze, and 12 takes 4th place.
points=[3, 8] → ['Silver Medal', 'Gold Medal']
With only two skaters, 8 gets gold and 3 gets silver.
points=[1, 2, 3, 4, 5, 6] → ['6', '5', '4', 'Bronze Medal', 'Silver Medal', 'Gold Medal']
points are distinctpoints=[40, 95, 12, 70]
['Bronze Medal', 'Gold Medal', '4', 'Silver Medal']
Run checks the first 3 tests in your browser. Submit checks all 88 tests on the server, hidden ones included.