You are viewing a single comment's thread. Return to all comments →
Mine is so similar to your solution: But I have to append a zero at the end. You bet me by that.
#!/bin/python3 import sys if __name__ == "__main__": n = int(input().strip()) scores = sorted(list(set(list(map(int, input().strip().split(' '))))), reverse=True) m = int(input().strip()) alice = list(map(int, input().strip().split(' '))) scores.append(0) l = len(scores) # Write Your Code Here for a in alice: while (l > 0) and (a >= scores[l-1]): l -= 1 print(l+1)
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 →
Mine is so similar to your solution: But I have to append a zero at the end. You bet me by that.