You are viewing a single comment's thread. Return to all comments →
be careful with the time limit exceed, so annoying
the program should be sort desc (start from last)
ranked = sorted(set(ranked), reverse=True) res = [] i = len(ranked) - 1 # Start from the last element in the ranked list for score in player: while i >= 0 and score >= ranked[i]: i -= 1 res.append(i + 2) return res
Seems like cookies are disabled on this browser, please enable them to open this website
Climbing the Leaderboard
You are viewing a single comment's thread. Return to all comments →
be careful with the time limit exceed, so annoying
the program should be sort desc (start from last)