Find the Runner-Up Score - Solution of HackerRank Python Basic Data Types.
Code:
if __name__ == '__main__':
n = int(input())
arr = set(map(int, input().split()))
arr = sorted(arr, key=int, reverse=True)
arr.pop(0)
print(arr.pop(0))
Example Input:
5 2 3 6 6 5
Output:
5