You are viewing a single comment's thread. Return to all comments →
k = int(input()) l = list(map(int,input().split())) l.sort()
for i in range(0,len(l)-1,k): if l[i] != l[i+4]: break
else: i = len(l) - 1
print(l[i])
Seems like cookies are disabled on this browser, please enable them to open this website
The Captain's Room
You are viewing a single comment's thread. Return to all comments →
Enter your code here. Read input from STDIN. Print output to STDOUT
k = int(input()) l = list(map(int,input().split())) l.sort()
for i in range(0,len(l)-1,k): if l[i] != l[i+4]: break
print(l[i])