You are viewing a single comment's thread. Return to all comments →
It's because your not transfer your array to list. For have chance reuse array with map function we must transfer it to list:
if name == 'main': n = int(input()) arr = list(map(int, input().split())) first = 0 second = 0
for i in arr: if i > first: first = i for j in arr: if j == first: continue elif j > second: second = j print(second)
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 →
It's because your not transfer your array to list. For have chance reuse array with map function we must transfer it to list: