You are viewing a single comment's thread. Return to all comments →
n = int(input())
arr = list(map(int, input().split()))
while len(arr) != n:
print(f"Please enter exactly {n} numbers!") arr = list(map(int, input().split()))
runner_up = sorted(set(arr))
runner_up.pop()
print(runner_up[-1]) `
Seems like cookies are disabled on this browser, please enable them to open this website
An unexpected error occurred. Please try reloading the page. If problem persists, please contact support@hackerrank.com
Find the Runner-Up Score!
You are viewing a single comment's thread. Return to all comments →
n = int(input())
arr = list(map(int, input().split()))
while len(arr) != n:
runner_up = sorted(set(arr))
runner_up.pop()
print(runner_up[-1]) `