79347372

Date: 2025-01-11 01:55:23
Score: 1
Natty:
Report link
if __name__ == '__main__':
n = int(input())
arr = list(map(int, input().split()))
print(max([i for i in (arr) if i != max(arr)]))

Getting the max value, filtering it with if inside a for loop and getting the max value from the result will get you the runner-up value.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Lucas de Souza Castellani