You are viewing a single comment's thread. Return to all comments →
Pretty confused. I did pretty much exactly what you were trying to do
import operator
if name == 'main': n = int(raw_input()) arr = map(int, raw_input().split()) max_value = max(arr) arr = arr.remove(max_value) second_max = max(arr)
print (second_max)
but I get a runtime error with this code.
Seems like cookies are disabled on this browser, please enable them to open this website
Find the Runner-Up Score!
You are viewing a single comment's thread. Return to all comments →
Pretty confused. I did pretty much exactly what you were trying to do
import operator
if name == 'main': n = int(raw_input()) arr = map(int, raw_input().split()) max_value = max(arr) arr = arr.remove(max_value) second_max = max(arr)
but I get a runtime error with this code.